On 22/07/18 09:27, David Miller wrote:
> From: Nikolay Aleksandrov
> Date: Fri, 20 Jul 2018 17:48:25 +0300
>
>> +spin_lock_bh(&p->br->lock);
>> +ret = brport_attr->store_raw(p, (char *)buf);
>> +spin_unlock_bh(&p->br->lock);
>
> Please respect the const here.
From: Nikolay Aleksandrov
Date: Fri, 20 Jul 2018 17:48:25 +0300
> + spin_lock_bh(&p->br->lock);
> + ret = brport_attr->store_raw(p, (char *)buf);
> + spin_unlock_bh(&p->br->lock);
Please respect the const here.
Have the methods do a kstrncup(); ... kfree(); s
On Fri, 20 Jul 2018 20:47:26 +0300
Nikolay Aleksandrov wrote:
> On July 20, 2018 8:26:36 PM GMT+03:00, Nikolay Aleksandrov
> wrote:
> >On July 20, 2018 8:20:44 PM GMT+03:00, Stephen Hemminger
> > wrote:
> >>On Fri, 20 Jul 2018 20:14:43 +0300
> >>Nikolay Aleksandrov wrote:
> >>
> >>> >Casti
On July 20, 2018 8:26:36 PM GMT+03:00, Nikolay Aleksandrov
wrote:
>On July 20, 2018 8:20:44 PM GMT+03:00, Stephen Hemminger
> wrote:
>>On Fri, 20 Jul 2018 20:14:43 +0300
>>Nikolay Aleksandrov wrote:
>>
>>> >Casting away the const on the buf variable is going to cause
>>warnings
>>> >and should n
On July 20, 2018 8:20:44 PM GMT+03:00, Stephen Hemminger
wrote:
>On Fri, 20 Jul 2018 20:14:43 +0300
>Nikolay Aleksandrov wrote:
>
>> >Casting away the const on the buf variable is going to cause
>warnings
>> >and should not be necessary.
>> >
>>
>> It doesn't when it's casted like that, the n
On Fri, 20 Jul 2018 20:14:43 +0300
Nikolay Aleksandrov wrote:
> >Casting away the const on the buf variable is going to cause warnings
> >and should not be necessary.
> >
>
> It doesn't when it's casted like that, the new line is changed to null byte
> so we need to drop
> the const.
Then c
On July 20, 2018 6:57:25 PM GMT+03:00, Stephen Hemminger
wrote:
>On Fri, 20 Jul 2018 17:48:25 +0300
>Nikolay Aleksandrov wrote:
>
>> This patch adds a new alternative store callback for port sysfs
>options
>> which takes a raw value (buf) and can use it directly. It is needed
>for the
>> backup
On Fri, 20 Jul 2018 17:48:25 +0300
Nikolay Aleksandrov wrote:
> This patch adds a new alternative store callback for port sysfs options
> which takes a raw value (buf) and can use it directly. It is needed for the
> backup port sysfs support since we have to pass the device by its name.
>
> Sign
This patch adds a new alternative store callback for port sysfs options
which takes a raw value (buf) and can use it directly. It is needed for the
backup port sysfs support since we have to pass the device by its name.
Signed-off-by: Nikolay Aleksandrov
---
There are a few checkpatch warnings he