Outreachy
Hi Mentors,
I am Menna, Outreachy applicant and I work on my clean-up patches.
Is it Okay to work on this error reported by checkpatch script?
drivers/staging/iio/frequency/ad9832.c
--------------------------------------
ERROR: Use 4 digit octal (0777) not decimal permissions
#256: FILE: drivers/staging/iio/frequency/ad9832.c:256:
+static IIO_DEV_ATTR_FREQ(0, 1, 0200, NULL, ad9832_write, AD9832_FREQ1HM);
ERROR: Use 4 digit octal (0777) not decimal permissions
#257: FILE: drivers/staging/iio/frequency/ad9832.c:257:
+static IIO_DEV_ATTR_FREQSYMBOL(0, 0200, NULL, ad9832_write, AD9832_FREQ_SYM);
ERROR: Use 4 digit octal (0777) not decimal permissions
#260: FILE: drivers/staging/iio/frequency/ad9832.c:260:
+static IIO_DEV_ATTR_PHASE(0, 0, 0200, NULL, ad9832_write, AD9832_PHASE0H);
ERROR: Use 4 digit octal (0777) not decimal permissions
#261: FILE: drivers/staging/iio/frequency/ad9832.c:261:
+static IIO_DEV_ATTR_PHASE(0, 1, 0200, NULL, ad9832_write, AD9832_PHASE1H);
ERROR: Use 4 digit octal (0777) not decimal permissions
#262: FILE: drivers/staging/iio/frequency/ad9832.c:262:
+static IIO_DEV_ATTR_PHASE(0, 2, 0200, NULL, ad9832_write, AD9832_PHASE2H);
ERROR: Use 4 digit octal (0777) not decimal permissions
#263: FILE: drivers/staging/iio/frequency/ad9832.c:263:
+static IIO_DEV_ATTR_PHASE(0, 3, 0200, NULL, ad9832_write, AD9832_PHASE3H);
ERROR: Use 4 digit octal (0777) not decimal permissions
#264: FILE: drivers/staging/iio/frequency/ad9832.c:264:
+static IIO_DEV_ATTR_PHASESYMBOL(0, 0200, NULL,
+ ad9832_write, AD9832_PHASE_SYM);
ERROR: Use 4 digit octal (0777) not decimal permissions
#268: FILE: drivers/staging/iio/frequency/ad9832.c:268:
+static IIO_DEV_ATTR_PINCONTROL_EN(0, 0200, NULL,
+ ad9832_write, AD9832_PINCTRL_EN);
ERROR: Use 4 digit octal (0777) not decimal permissions
#270: FILE: drivers/staging/iio/frequency/ad9832.c:270:
+static IIO_DEV_ATTR_OUT_ENABLE(0, 0200, NULL,
+ ad9832_write, AD9832_OUTPUT_EN);
total: 9 errors, 0 warnings, 0 checks, 462 lines checked
Thanks in advance,
Menna
Quoted 5 lines · Menna Mahmoud
Hi Mentors,
I am Menna, Outreachy applicant and I work on my clean-up patches.
Quoted 8 lines
Is it Okay to work on this error reported by checkpatch script?
drivers/staging/iio/frequency/ad9832.c
--------------------------------------
ERROR: Use 4 digit octal (0777) not decimal permissions
#256: FILE:drivers/staging/iio/frequency/ad9832.c:256:
+staticIIO_DEV_ATTR_FREQ(0, 1, 0200, NULL, ad9832_write, AD9832_FREQ1HM);
What??? Is it complaining about the 0200? That is octal. Why is checkpatch complaining about this? Am I wrong? Maybe I am misreading.
I could investigate, but I am leaving that task to you. It may be that checkpatch has a problem and you can fix that instead.
regards,
dan carpenter
Quoted 15 lines · Dan Carpenter
Quoted 5 lines · Menna Mahmoud
Hi Mentors,
I am Menna, Outreachy applicant and I work on my clean-up patches.
Quoted 8 lines
Is it Okay to work on this error reported by checkpatch script?
drivers/staging/iio/frequency/ad9832.c
--------------------------------------
ERROR: Use 4 digit octal (0777) not decimal permissions
#256: FILE:drivers/staging/iio/frequency/ad9832.c:256:
+staticIIO_DEV_ATTR_FREQ(0, 1, 0200, NULL, ad9832_write, AD9832_FREQ1HM);
Quoted 6 lines
What??? Is it complaining about the 0200? That is octal. Why is checkpatch complaining about this? Am I wrong? Maybe I am misreading.
I could investigate, but I am leaving that task to you. It may be that checkpatch has a problem and you can fix that instead.
Yes, checkpatch seems to be confused here.
Signature · 1 line
~Randy
Quoted 16 lines · Randy Dunlap
Quoted 14 lines · Dan Carpenter
Quoted 13 lines · Menna Mahmoud
Hi Mentors,
I am Menna, Outreachy applicant and I work on my clean-up patches.
Is it Okay to work on this error reported by checkpatch script?
drivers/staging/iio/frequency/ad9832.c
--------------------------------------
ERROR: Use 4 digit octal (0777) not decimal permissions
#256: FILE:drivers/staging/iio/frequency/ad9832.c:256:
+staticIIO_DEV_ATTR_FREQ(0, 1, 0200, NULL, ad9832_write, AD9832_FREQ1HM);
Quoted 7 lines
Quoted 6 lines
What??? Is it complaining about the 0200? That is octal. Why is checkpatch complaining about this? Am I wrong? Maybe I am misreading.
I could investigate, but I am leaving that task to you. It may be that checkpatch has a problem and you can fix that instead.
Yes, checkpatch seems to be confused here.
It seems to make an assumption that everything starting with IIO_DEV_ATTR_ has the mode field at the same position. Which is not the case.
https://github.com/torvalds/linux/blob/master/scripts/checkpatch.pl#L798
Still a good target to get this fixed as part of a outreachy task.
Quoted 24 lines · Lars-Peter Clausen
Quoted 23 lines · Randy Dunlap
Quoted 21 lines · Dan Carpenter
Quoted 8 lines · Menna Mahmoud
Hi Mentors,
I am Menna, Outreachy applicant and I work on my clean-up patches.
Is it Okay to work on this error reported by checkpatch script?
Quoted 6 lines
drivers/staging/iio/frequency/ad9832.c
--------------------------------------
ERROR: Use 4 digit octal (0777) not decimal permissions #256: FILE:drivers/staging/iio/frequency/ad9832.c:256:
+staticIIO_DEV_ATTR_FREQ(0, 1, 0200, NULL, ad9832_write, AD9832_FREQ1HM);What??? Is it complaining about the 0200? That is octal. Why is checkpatch complaining about this? Am I wrong? Maybe I am misreading.
I could investigate, but I am leaving that task to you. It may be that checkpatch has a problem and you can fix that instead.
Quoted 6 lines
Quoted 1 line
Yes, checkpatch seems to be confused here.
It seems to make an assumption that everything starting with
IIO_DEV_ATTR_has the mode field at the same position. Which is not the case.https://github.com/torvalds/linux/blob/master/scripts/checkpatch.pl#L798
Still a good target to get this fixed as part of a outreachy task.
I see, Thanks Randy and Lars-Peter for your help I will try check this.