Re: [PATCH v8 2/5] nvmem: eeprom: at25: add support for FRAM

From: Jiří Prchal
Date: Tue Jun 08 2021 - 05:57:11 EST




On 08. 06. 21 11:07, Greg Kroah-Hartman wrote:
+ int has_sernum;

bool?

OK.

+ spi_message_init(&m);
+ memset(t, 0, sizeof(t));

Are you allowed to send spi messages off of the stack?

I don't know, but it's functional. Copied from read function.


- dev_info(&spi->dev, "%d %s %s eeprom%s, pagesize %u\n",
- (chip.byte_len < 1024) ? chip.byte_len : (chip.byte_len / 1024),
- (chip.byte_len < 1024) ? "Byte" : "KByte",
- at25->chip.name,
- (chip.flags & EE_READONLY) ? " (readonly)" : "",
- at25->chip.page_size);
+ dev_info(&spi->dev, "%d %s %s %s%s, pagesize %u\n",
+ (chip.byte_len < 1024) ? chip.byte_len : (chip.byte_len / 1024),
+ (chip.byte_len < 1024) ? "Byte" : "KByte",
+ at25->chip.name, is_fram ? "fram" : "eeprom",
+ (chip.flags & EE_READONLY) ? " (readonly)" : "",
+ at25->chip.page_size);

When drivers work properly, they should be quiet. This whole dev_info()
should be removed in a later patch.

OK, didn't know, originally there is such info output. And keeping simplest smallest patch changes.