Re: [PATCH v2] staging: sm750fb: remove unused variable

From: neha arora

Date: Fri May 29 2026 - 07:29:29 EST


Hi Dan,

After looking into the structural dependencies and the cross-casting
between init_status and initchip_param, I've decided that this
refactoring is outside the scope of what I want to work on at this
time.
Please feel free to drop my previous patch. I'm going to shift my
focus to other areas.

Regards,
Onish


On Fri, May 29, 2026 at 4:09 PM Dan Carpenter <error27@xxxxxxxxx> wrote:
>
> On Fri, May 29, 2026 at 03:42:42PM +0530, Onish Sharma wrote:
> > Remove the set_all_eng_off flag and its associated cleanup logic.
> > The variable is redundant as the hardware should be initialized to a
> > known state regardless of prior usage.
> >
> > Suggested-by: Dan Carpenter <error27@xxxxxxxxx>
> > Signed-off-by: Onish Sharma <neharora23587@xxxxxxxxx>
> > ---
>
> Sorry, miscommunication. This breaks the driver. This is also a bit
> more involved than I thought...
>
> There are two structs:
>
> struct init_status {
> ushort power_mode;
> /* below three clocks are in unit of MHZ*/
> ushort chip_clk;
> ushort mem_clk;
> ushort master_clk;
> ushort setAllEngOff;
> ushort reset_memory;
> };
>
> And struct initchip_param. The initchip_param is exactly the same but
> with all the struct members renamed and comments added. They have to
> match because we cast back and forth.
>
> Why do we have two different struct that have to be the same? You might
> think it is for API, but as near as I can see that is not the case.
> Maybe it was at some point? We should get rid of one struct. Which
> everyone is API is the one we should keep. If neither is API then get
> rid of init_status and keep initchip_param.
>
> After that we can talk about getting rid of setAllEngOff/set_all_eng_off.
>
> regards,
> dan carpenter
>