lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPsOcum71Rt7i+CcMR9-ZZOxjkfJBrL73gR7UppTrE5Wgz9wKA@mail.gmail.com>
Date: Thu, 15 Jan 2026 18:20:50 +0530
From: Karthikey Kadati <karthikey3608@...il.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: sudipm.mukherjee@...il.com, teddy.wang@...iconmotion.com, 
	linux-fbdev@...r.kernel.org, linux-staging@...ts.linux.dev, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] staging: sm750fb: Convert sw_i2c_read_sda to return bool

You are right. I overlooked that the return value is used in bitwise
shift operations used to construct the data byte.
Since `sw_i2c_read_sda()` returns a raw data bit (0 or 1) intended for
shifting, `bool` is semantically incorrect here.

I will drop this patch.

Thanks,
Karthikey


On Thu, 15 Jan 2026 at 17:02, Greg KH <gregkh@...uxfoundation.org> wrote:
>
> On Wed, Jan 14, 2026 at 10:47:48PM +0530, Karthikey Kadati wrote:
> > The sw_i2c_read_sda() function currently returns unsigned char (1 or 0).
> > Standardize it to return bool (true or false) to match kernel standards.
> >
> > Signed-off-by: Karthikey Kadati <karthikey3608@...il.com>
> > ---
> > v3:
> >   - Add version history (Reported by kernel test robot).
> > v2:
> >   - Fix invalid "Unix Antigravity" Signed-off-by.
> >   - Submit as standalone patch (detached from unrelated series).
> >
> >  drivers/staging/sm750fb/ddk750_swi2c.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/sm750fb/ddk750_swi2c.c b/drivers/staging/sm750fb/ddk750_swi2c.c
> > index 0ef8d4ff2..9d48673d3 100644
> > --- a/drivers/staging/sm750fb/ddk750_swi2c.c
> > +++ b/drivers/staging/sm750fb/ddk750_swi2c.c
> > @@ -180,7 +180,7 @@ static void sw_i2c_sda(unsigned char value)
> >   *  Return Value:
> >   *      The SDA data bit sent by the Slave
> >   */
> > -static unsigned char sw_i2c_read_sda(void)
> > +static bool sw_i2c_read_sda(void)
>
> So how does this call:
>         data |= (sw_i2c_read_sda() << i);
> work with a boolean?
>
> confused,
>
> greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ