Re: [PATCH 1/8] staging: sm250fb: remove USE_HW_I2C check

From: Greg Kroah-Hartman
Date: Fri Apr 18 2025 - 06:34:11 EST


On Thu, Apr 17, 2025 at 08:02:49PM +0100, Ruben Wauters wrote:
> Removes the USE_HW_I2C check and function defines in
> ddk750_sii164.c.
>
> The software equivalents were never used due to
> USE_HW_I2C being defined just before the ifdef, meaning
> the hardware versions were always used.
>
> The define names were also triggering checkpatch.pl's
> camel case check.
>
> Signed-off-by: Ruben Wauters <rubenru09@xxxxxxx>
>
> ---
>
> I am somewhat unsure whether this is the way to go or
> the correct way would be to add an option/opportunity for
> the software version to be used. Currently the hardware
> version is always used, but I am unsure if there ever even
> would be a case where you would want to use the software
> version over the hardware version.

Then the code can be added back, not an issue.

But you forgot this same check in
drivers/staging/sm750fb/ddk750_hwi2c.c, right?

Also, what about removing the sm750_sw_i2c_write_reg() and other
functions that are now never referenced? Can you add that to this patch
series? A single series that just removes the use of USE_HW_I2C and the
now unneeded functions would be best, as it's not really a "coding
style" fix, but rather a code cleanup thing, right?

thanks,

greg k-h