Re: [PATCH] scsi: sd: Use READ(16) when reading block zero on large capacity disks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/4/24 08:45, Martin K. Petersen wrote:
  static void sd_read_block_zero(struct scsi_disk *sdkp)
  {
-	unsigned int buf_len = sdkp->device->sector_size;
-	char *buffer, cmd[10] = { };
+	struct scsi_device *sdev = sdkp->device;
+	unsigned int buf_len = sdev->sector_size;
+	char *buffer, cmd[16] = { };

Maybe this is a good opportunity to change 'char' into 'u8'? It seems a
bit unusual to me to use signed char for a SCSI CDB and a data buffer.

Otherwise this patch looks good to me.

Thanks,

Bart.




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux