[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <828430032.148603.1416203787175.open-xchange@webmail.nmp.skynet.be>
Date: Mon, 17 Nov 2014 06:56:27 +0100 (CET)
From: Fabian Frederick <fabf@...net.be>
To: Julian Calaby <julian.calaby@...il.com>
Cc: Johannes Berg <johannes.berg@...el.com>,
linux-wireless <linux-wireless@...r.kernel.org>,
Larry Finger <Larry.Finger@...inger.net>,
Chaoming Li <chaoming_li@...lsil.com.cn>,
netdev <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Emmanuel Grumbach <emmanuel.grumbach@...el.com>,
b43-dev <b43-dev@...ts.infradead.org>,
Stefano Brivio <stefano.brivio@...imi.it>,
"John W. Linville" <linville@...driver.com>,
Intel Linux Wireless <ilw@...ux.intel.com>
Subject: Re: [PATCH 1/1 net-next] wireless: remove unnecessary sizeof(u8)
> On 16 November 2014 at 23:33 Julian Calaby <julian.calaby@...il.com> wrote:
>
>
> Hi Fabian,
>
> On Sat, Nov 15, 2014 at 7:55 AM, Fabian Frederick <fabf@...net.be> wrote:
> > sizeof(u8) is always 1.
>
> I thought that sizeof(*variable) was preferred over sizeof(type), so
> shouldn't these be switched to that format instead?
>
> (I know that this is all no-op, but it should reduce the potential for
> highly unlikely bugs in the future. Also, the extra processing is
> compile-time not run-time.)
>
> Thanks,
Hi Julian,
Of course but char/u8/s8... allocations never use it and result would be the
same:
factor 1 multiplication.
Those rare occurrences (+- 30 in the whole kernel) where we have
sizeof(u8/s8) is ambiguous.
Having a patch removing it gives a pointer...
If the developer meant something else, he will be able to fix it.
Regards,
Fabian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists