On Tue, 2018-05-08 at 12:08 -0500, Hook, Gary wrote:
On 5/7/2018 6:47 PM, kbuild test robot wrote:
All error/warnings (new ones prefixed by >>):
In file included from include/linux/intel-iommu.h:32:0,
from drivers/gpu/drm/i915/i915_drv.h:41,
from drivers/gpu/drm/i915/i915_oa_bxt.c:31:
include/linux/iommu.h: In function 'iommu_debugfs_new_driver_dir':
include/linux/iommu.h:706:8: error: parameter name omitted
struct dentry *iommu_debugfs_new_driver_dir(char *) {};
^~~~~~
In file included from include/linux/intel-iommu.h:32:0,
from drivers/gpu/drm/i915/i915_drv.h:41,
from drivers/gpu/drm/i915/i915_oa_bxt.c:31:
include/linux/iommu.h:706:8: warning: control reaches end of non-void function [-Wreturn-type]
struct dentry *iommu_debugfs_new_driver_dir(char *) {};
^~~~~~
vim +706 include/linux/iommu.h
700
701 #ifdef CONFIG_IOMMU_DEBUGFS
702 void iommu_debugfs_setup(void);
703 struct dentry *iommu_debugfs_new_driver_dir(char *);
704 #else
705 static inline void iommu_debugfs_setup(void) {}
> 706 struct dentry *iommu_debugfs_new_driver_dir(char *) {};
707 #endif
708
I have no problems with adding parameter names. But
scripts/checkpatch.pl doesn't seem to check for this, nor require it.
Should checkpatch be updated?
I'm pretty sure that's not feasible.
And when the compiler tells you you've stuffed up some
syntactical bit, why should checkpatch duplicate the
output error message too?
btw: That's an unnecessary ; at the end of that non-void
function and it should probably be something like:
static inline struct dentry *iommu_debugfs_new_driver_dir(char *dir)
{
return NULL;
}