Re: [PATCH v2] usb: dwc3: gadget: Add TxFIFO resizing supports for single port RAM
From: Thinh Nguyen
Date: Mon Nov 11 2024 - 19:26:31 EST
On Mon, Nov 11, 2024, Thinh Nguyen wrote:
> > +/**
> > + * dwc3_gadget_calc_ram_depth - calculates the ram depth for txfifo
> > + * @dwc: pointer to the DWC3 context
> > + */
> > +static int dwc3_gadget_calc_ram_depth(struct dwc3 *dwc)
> > +{
> > + int ram_depth;
> > + int fifo_0_start;
> > + bool is_single_port_ram;
> > + int tmp;
>
> Try to list this in reversed christmas tree style when possible. Move
> declaration of tmp under the if (is_single_port_ram) scope.
>
Also, use type u32 and rename "tmp" to "reg".
BR,
Thinh