Re: [PATCH 4/6] soc: qcom: geni-se: Define the QSPI firmware protocol
From: Krzysztof Kozlowski
Date: Wed Nov 11 2026 - 07:57:18 EST
On Mon, Nov 09, 2026 at 08:13:33PM +0530, Jyothi Kumar Seerapu wrote:
> > > -static const char * const protocol_name[] = { "None", "SPI", "UART", "I2C", "I3C", "SPI SLAVE" };
> > > +static const char * const protocol_name[] = {
> > > + "None", "SPI", "UART", "I2C", "I3C", "SPI SLAVE",
> > > + [GENI_SE_QSPI] = "QSPI",
> >
> > Why are you creating holes in this array?
>
> Hi Krzysztof,
> The array is indexed by the GENI protocol ID. QSPI uses ID 9, while the
> existing entries cover IDs 0–5, so the designated initializer leaves entries
> 6–8 empty.
> The added NULL check rejects these unused entries before accessing the
> protocol name. Appending "QSPI" directly would incorrectly associate it with
> ID 6.
And it should be 6. Just look at uses of this.
Best regards,
Krzysztof