[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vdqnk_qNs8Rc4M-Rh5-AXCi4uV+iw6sbHXEZiaBaFoRyA@mail.gmail.com>
Date: Sat, 12 Apr 2025 20:52:32 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Abraham Samuel Adekunle <abrahamadekunle50@...il.com>, outreachy@...ts.linux.dev,
julia.lawall@...ia.fr, gregkh@...uxfoundation.org,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
david.laight.linux@...il.com, andy@...nel.org
Subject: Re: [PATCH] staging: rtl8723bs: Replace `& 0xfff` with `% 4096u`
On Sat, Apr 12, 2025 at 5:19 PM Dan Carpenter <dan.carpenter@...aro.org> wrote:
> On Fri, Apr 11, 2025 at 03:47:40PM +0300, Andy Shevchenko wrote:
> > On Fri, Apr 11, 2025 at 1:37 PM Dan Carpenter <dan.carpenter@...aro.org> wrote:
> > > On Thu, Apr 10, 2025 at 08:43:53PM +0300, Andy Shevchenko wrote:
> > > >
> > > > > $ make drivers/staging/rtl8723bs/core/rtw_xmit.o
> > > > > $ cmp rtw_xmit_before.o rtw_xmit_after.o
> > > >
> > > > cmp is good but not good enough in general. Here it shows the 1:1
> > > > binary, but in some cases code can be the same, while binaries are
> > > > different. To make sure the code is the same use the bloat-o-meter
> > > > tool instead.
> > >
> > > I don't understand what you're saying at all. cmp shows that the compiler
> > > was automaticall tanslating the "& 0xfff" into "% 04096u" so the resulting
> > > object files are exactly the same.
> >
> > There is a possibility that the compiler changes the code to the
> > equivalent and cmp will break, bloat-o-meter will check at least what
> > happened to the size of the *code*. object file is not only a code. It
> > may also contain debug symbols and other stuff which may break cmp,
> > while the code can be *the same*.
>
> So far as I can see bloat-o-meter is only looking at the size. I
> deliberately introduced a bug to see if bloat-o-meter said anything but
> it said the size was the same.
Not "size", "size of the code" is more specific. That makes the
difference to cmp which may lag even on the same code, but slightly
different debuginfo, for example.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists