lkml.org 
[lkml]   [2023]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/41] mtd: spi-nor: default page_size to 256 bytes
Hi Michael,

michael@walle.cc wrote on Mon, 07 Aug 2023 16:29:38 +0200:

> 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].

Elvis operator :')

> 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

Okay then... I didn't know this was encouraged.

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

Thanks,
Miquèl

\
 
 \ /
  Last update: 2023-08-07 16:34    [W:1.643 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site