[PATCH 6/9] nvme-apple: Add initial Apple SoC NVMe driver

Hector Martin marcan at marcan.st
Mon Apr 4 08:57:33 PDT 2022


On 24/03/2022 15.16, Christoph Hellwig wrote:
>> +
>> +//#define DEBUG
> 
> This should not leak into the driverṡ
> 
>> +#include <linux/blk-integrity.h>
> 
> As far as I can tell this driver does not support metadata or PI,
> so why is this include needed?
> 
>> +/* NVM Express NVM Command Set Specification, Revision 1.0a, Figure 18 */
>> +#define NVME_OPCODE_DATA_XFER_HOST_TO_CTRL BIT(0)
>> +#define NVME_OPCODE_DATA_XFER_CTRL_TO_HOST BIT(1)
> 
> Please just use the nvme_is_write helper where you are using these.
> 
>> +static int apple_nvme_sart_dma_setup(void *cookie, struct apple_rtkit_shmem *bfr,
> 
> Please avoid > 80 character lines.

The kernel hard limit is 100-character lines, not 80-character lines.
Maintainers for existing drivers are certainly free to stick to 80 chars
if they like it that way, but I don't see why we should still be
enforcing that for new code. See bdc48fa11e46.

And also:
https://lkml.iu.edu/hypermail/linux/kernel/2005.3/08168.html

Quoth Torvalds, addressing you personally:

"If you or Christoph have 80 character lines, you'll get possibly ugly
wrapped output. Tough. That's _your_ choice. Your hardware limitations
shouldn't be a pain for the rest of us."

-- 
Hector Martin (marcan at marcan.st)
Public Key: https://mrcn.st/pub



More information about the Linux-nvme mailing list