Skip to contentSkip to conversation

new patch

DISCUSSION Menna Mahmoud 2 participants 5 messages Mar 15, 2023 – Mar 19, 2023

lore
Share & tools
lore
#0 lore raw

Hi Mentors,

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

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

```

Thanks and regards,

Menna

#1 lore raw
Quoted 2 lines · Menna Mahmoud

Hi Mentors,

Hey Menna, welcome to Outreachy!

First I'll make a small comment on your email subject. Remember that when posting to a mailing list the folks getting the emails may be looking at 100's or even 1000's of emails on the list each day.

A subject of 'new patch' is pretty generic and is unlikely to result in any interest in reading your post.

With that in mind lets look through the below errors.

Quoted 9 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

This error is trying to flag a mode permission which is not in Octal form. Are you familiar with decimal vs octal vs hex notations?

Quoted 2 lines

#256: FILE: drivers/staging/iio/frequency/ad9832.c:256:
+static IIO_DEV_ATTR_FREQ(0, 1, 0200, NULL, ad9832_write, AD9832_FREQ1HM);

What do you think is wrong with this line?

Hint: I'm not sure I see the problem.

So your email should have had a subject which reflects this question. Perhaps a subject like:

"Is this a valid checkpatch error?"

FWIW I'm concerned this is some corner case checkpatch bug. But I'm not seeing the issue in checkpatch (My perl is very rusty).

Do you see the error checkpatch is flagging? Or do you think this may be a bug in checkpatch?

Ira

#2 lore raw
Quoted 5 lines · Ira Weiny
Quoted 2 lines · Menna Mahmoud

Hi Mentors,

Hey Menna, welcome to Outreachy!

Quoted 8 lines

First I'll make a small comment on your email subject. Remember that when posting to a mailing list the folks getting the emails may be looking at 100's or even 1000's of emails on the list each day.

A subject of 'new patch' is pretty generic and is unlikely to result in any interest in reading your post.

With that in mind lets look through the below errors.

I see, I will do that.

Quoted 11 lines
Quoted 9 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

This error is trying to flag a mode permission which is not in Octal form. Are you familiar with decimal vs octal vs hex notations?

yes, I am familiar with them.

Quoted 12 lines
Quoted 3 lines

#256: FILE: drivers/staging/iio/frequency/ad9832.c:256:
+static IIO_DEV_ATTR_FREQ(0, 1, 0200, NULL, ad9832_write, AD9832_FREQ1HM);

What do you think is wrong with this line?

Hint: I'm not sure I see the problem.

So your email should have had a subject which reflects this question. Perhaps a subject like:

"Is this a valid checkpatch error?"

Quoted 7 lines

FWIW I'm concerned this is some corner case checkpatch bug. But I'm not seeing the issue in checkpatch (My perl is very rusty).

Do you see the error checkpatch is flagging? Or do you think this may be a bug in checkpatch?

Ira

I'mn't sure too, I sent this because I submit previous patches but I got comments from mentors that no need to fix them so

I asked if these errors need to fix or should I ignore them.

Thanks,

Menna

#3 lore raw
Quoted 3 lines · Menna Mahmoud
Quoted 1 line · Ira Weiny

Menna Mahmoud wrote:

[...]

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Is it okay to work on this error reported by checkpatch script:

```

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

drivers/staging/iio/frequency/ad9832.c
--------------------------------------
ERROR: Use 4 digit octal (0777) not decimal permissions

This error is trying to flag a mode permission which is not in Octal form. Are you familiar with decimal vs octal vs hex notations?

yes, I am familiar with them.

Awesome!

Quoted 19 lines
Quoted 19 lines
Quoted 4 lines

#256: FILE: drivers/staging/iio/frequency/ad9832.c:256:
+static IIO_DEV_ATTR_FREQ(0, 1, 0200, NULL, ad9832_write, AD9832_FREQ1HM);

What do you think is wrong with this line?

Hint: I'm not sure I see the problem.

So your email should have had a subject which reflects this question. Perhaps a subject like:

"Is this a valid checkpatch error?"

FWIW I'm concerned this is some corner case checkpatch bug. But I'm not seeing the issue in checkpatch (My perl is very rusty).

Do you see the error checkpatch is flagging? Or do you think this may be a bug in checkpatch?

Quoted 7 lines
Quoted 1 line

Ira

I'mn't sure too, I sent this because I submit previous patches but I got comments from mentors that no need to fix them so

I asked if these errors need to fix or should I ignore them.

I've just caught up with the other thread on this.

https://lore.kernel.org/all/[email protected]/

Do follow up there. I think we should stop posting on this thread.

Do notice how your subject of 'Outreachy' and 'new patch' become meaningless for these 2 threads.

I suspect you had some issue with the mail client and that is why you emailed this question 2 times?

Anyway, I'm caught up. :-D

Ira

#4 lore raw
Quoted 48 lines · Ira Weiny
Quoted 2 lines · Menna Mahmoud
Quoted 1 line · Ira Weiny

Menna Mahmoud wrote:

[...]

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Is it okay to work on this error reported by checkpatch script:

```

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

drivers/staging/iio/frequency/ad9832.c
--------------------------------------
ERROR: Use 4 digit octal (0777) not decimal permissions

This error is trying to flag a mode permission which is not in Octal form. Are you familiar with decimal vs octal vs hex notations?

yes, I am familiar with them.

Awesome!

Quoted 17 lines
Quoted 17 lines
Quoted 2 lines

#256: FILE: drivers/staging/iio/frequency/ad9832.c:256:
+static IIO_DEV_ATTR_FREQ(0, 1, 0200, NULL, ad9832_write, AD9832_FREQ1HM);

What do you think is wrong with this line?

Hint: I'm not sure I see the problem.

So your email should have had a subject which reflects this question. Perhaps a subject like:

"Is this a valid checkpatch error?"

FWIW I'm concerned this is some corner case checkpatch bug. But I'm not seeing the issue in checkpatch (My perl is very rusty).

Do you see the error checkpatch is flagging? Or do you think this may be a bug in checkpatch?

Quoted 6 lines
Quoted 1 line

Ira

I'mn't sure too, I sent this because I submit previous patches but I got comments from mentors that no need to fix them so

I asked if these errors need to fix or should I ignore them.

I've just caught up with the other thread on this.

https://lore.kernel.org/all/[email protected]/

Do follow up there. I think we should stop posting on this thread.

Quoted 8 lines

Do notice how your subject of 'Outreachy' and 'new patch' become meaningless for these 2 threads.

I suspect you had some issue with the mail client and that is why you emailed this question 2 times?

Anyway, I'm caught up. :-D
Ira

yes, you are right i had some issue but fixed, thanks a lot and appreciate your help.

Menna