[PATCH 06/41] mtd: spi-nor: default page_size to 256 bytes

Michael Walle michael at walle.cc
Mon Aug 7 07:29:38 PDT 2023


Hi Miquel,

>> +	params->page_size = info->page_size ?: SPI_NOR_DEFAULT_PAGE_SIZE;
> 
> Would you mind clarifying this? It does not look right, while
> perhaps it is. But TBH, I have no idea what params->page_size will be
> after this assignment.

It's info->page_size, it's a shortcut [1].

I'm not the first one using it (in fact I was explicitly asked to use 
it,
e.g. in gpio subsys):

$ grep -r "?:" **/*.c |wc -l
1268

-michael

[1] https://en.wikipedia.org/wiki/Elvis_operator



More information about the linux-mtd mailing list