Re: [PATCH v6 3/6] w1: ds2438: fixed a coding style issue
On Fri, Apr 09, 2021 at 12:15:30AM -0300, Luiz Sampaio wrote: > Changed the permissions to preferred octal style. > > Signed-off-by: Luiz Sampaio > --- > drivers/w1/slaves/w1_ds2438.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/w1/slaves/w1_ds2438.c b/drivers/w1/slaves/w1_ds2438.c > index 56e53a748059..ccb06b8c2d78 100644 > --- a/drivers/w1/slaves/w1_ds2438.c > +++ b/drivers/w1/slaves/w1_ds2438.c > @@ -388,7 +388,7 @@ static ssize_t vdd_read(struct file *filp, struct kobject > *kobj, > return ret; > } > > -static BIN_ATTR(iad, S_IRUGO | S_IWUSR | S_IWGRP, iad_read, iad_write, 0); > +static BIN_ATTR_RW(iad, 0664, iad_write, 0); You obviously did not build this commit :( And you did more than just fix a "coding style issue". thanks, greg k-h
Re: [PATCH v6 3/6] w1: ds2438: fixed a coding style issue
Hi Luiz, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.12-rc6 next-20210408] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Luiz-Sampaio/w1-ds2438-fixed-a-coding-style-issue/20210409-121608 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 17e7124aad766b3f158943acb51467f86220afe9 config: arm-randconfig-r032-20210409 (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/3ca70e59a342a9c6fd7db0bc937bbd0c80da9711 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Luiz-Sampaio/w1-ds2438-fixed-a-coding-style-issue/20210409-121608 git checkout 3ca70e59a342a9c6fd7db0bc937bbd0c80da9711 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/w1/slaves/w1_ds2438.c:391:43: error: macro "BIN_ATTR_RW" passed 4 >> arguments, but takes just 2 391 | static BIN_ATTR_RW(iad, 0664, iad_write, 0); | ^ In file included from include/linux/kobject.h:20, from include/linux/module.h:20, from drivers/w1/slaves/w1_ds2438.c:9: include/linux/sysfs.h:229: note: macro "BIN_ATTR_RW" defined here 229 | #define BIN_ATTR_RW(_name, _size) \ | >> drivers/w1/slaves/w1_ds2438.c:391:8: error: type defaults to 'int' in >> declaration of 'BIN_ATTR_RW' [-Werror=implicit-int] 391 | static BIN_ATTR_RW(iad, 0664, iad_write, 0); |^~~ drivers/w1/slaves/w1_ds2438.c:398:3: error: 'bin_attr_iad' undeclared here (not in a function); did you mean 'bin_attr_vad'? 398 | &bin_attr_iad, | ^~~~ | bin_attr_vad drivers/w1/slaves/w1_ds2438.c:391:8: warning: 'BIN_ATTR_RW' defined but not used [-Wunused-variable] 391 | static BIN_ATTR_RW(iad, 0664, iad_write, 0); |^~~ drivers/w1/slaves/w1_ds2438.c:277:16: warning: 'iad_read' defined but not used [-Wunused-function] 277 | static ssize_t iad_read(struct file *filp, struct kobject *kobj, |^~~~ drivers/w1/slaves/w1_ds2438.c:255:16: warning: 'iad_write' defined but not used [-Wunused-function] 255 | static ssize_t iad_write(struct file *filp, struct kobject *kobj, |^ cc1: some warnings being treated as errors Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for ADI_AXI_ADC Depends on IIO && HAS_IOMEM && OF Selected by - AD9467 && IIO && SPI vim +/BIN_ATTR_RW +391 drivers/w1/slaves/w1_ds2438.c 390 > 391 static BIN_ATTR_RW(iad, 0664, iad_write, 0); 392 static BIN_ATTR_RO(page0, DS2438_PAGE_SIZE); 393 static BIN_ATTR_RO(temperature, 0/* real length varies */); 394 static BIN_ATTR_RO(vad, 0/* real length varies */); 395 static BIN_ATTR_RO(vdd, 0/* real length varies */); 396 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip
Re: [PATCH v6 3/6] w1: ds2438: fixed a coding style issue
Hi Luiz, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.12-rc6 next-20210408] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Luiz-Sampaio/w1-ds2438-fixed-a-coding-style-issue/20210409-121608 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 17e7124aad766b3f158943acb51467f86220afe9 config: x86_64-randconfig-a004-20210409 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dd453a1389b6a7e6d9214b449d3c54981b1a89b6) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://github.com/0day-ci/linux/commit/3ca70e59a342a9c6fd7db0bc937bbd0c80da9711 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Luiz-Sampaio/w1-ds2438-fixed-a-coding-style-issue/20210409-121608 git checkout 3ca70e59a342a9c6fd7db0bc937bbd0c80da9711 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/w1/slaves/w1_ds2438.c:391:31: error: too many arguments provided to >> function-like macro invocation static BIN_ATTR_RW(iad, 0664, iad_write, 0); ^ include/linux/sysfs.h:229:9: note: macro 'BIN_ATTR_RW' defined here #define BIN_ATTR_RW(_name, _size) \ ^ drivers/w1/slaves/w1_ds2438.c:398:3: error: use of undeclared identifier 'bin_attr_iad'; did you mean 'bin_attr_vad'? &bin_attr_iad, ^~~~ bin_attr_vad drivers/w1/slaves/w1_ds2438.c:394:8: note: 'bin_attr_vad' declared here static BIN_ATTR_RO(vad, 0/* real length varies */); ^ include/linux/sysfs.h:224:22: note: expanded from macro 'BIN_ATTR_RO' struct bin_attribute bin_attr_##_name = __BIN_ATTR_RO(_name, _size) ^ :113:1: note: expanded from here bin_attr_vad ^ 2 errors generated. vim +391 drivers/w1/slaves/w1_ds2438.c 390 > 391 static BIN_ATTR_RW(iad, 0664, iad_write, 0); 392 static BIN_ATTR_RO(page0, DS2438_PAGE_SIZE); 393 static BIN_ATTR_RO(temperature, 0/* real length varies */); 394 static BIN_ATTR_RO(vad, 0/* real length varies */); 395 static BIN_ATTR_RO(vdd, 0/* real length varies */); 396 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip
[PATCH v6 3/6] w1: ds2438: fixed a coding style issue
Changed the permissions to preferred octal style. Signed-off-by: Luiz Sampaio --- drivers/w1/slaves/w1_ds2438.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/w1/slaves/w1_ds2438.c b/drivers/w1/slaves/w1_ds2438.c index 56e53a748059..ccb06b8c2d78 100644 --- a/drivers/w1/slaves/w1_ds2438.c +++ b/drivers/w1/slaves/w1_ds2438.c @@ -388,7 +388,7 @@ static ssize_t vdd_read(struct file *filp, struct kobject *kobj, return ret; } -static BIN_ATTR(iad, S_IRUGO | S_IWUSR | S_IWGRP, iad_read, iad_write, 0); +static BIN_ATTR_RW(iad, 0664, iad_write, 0); static BIN_ATTR_RO(page0, DS2438_PAGE_SIZE); static BIN_ATTR_RO(temperature, 0/* real length varies */); static BIN_ATTR_RO(vad, 0/* real length varies */); -- 2.30.1