Re: [PATCH 3/4] esp_scsi: use strong typing for the dev field

2018-10-11 Thread Christoph Hellwig
On Thu, Oct 11, 2018 at 11:10:36AM +1100, Finn Thain wrote: > If you do so, can you also eliminate the dev argument to > scsi_esp_register()? Sure. > > - struct platform_device *op = esp->dev; > > + struct platform_device *op = to_platform_device(esp->dev); > > > > - esp->command_block =

Re: [PATCH 3/4] esp_scsi: use strong typing for the dev field

2018-10-10 Thread Finn Thain
On Wed, 10 Oct 2018, Christoph Hellwig wrote: > esp->dev is a void pointer that points either to a struct device, or a > struct platform_device. As we can easily get from the device to the > platform_device if needed change it to always point to a struct device > and properly type the pointer to

[PATCH 3/4] esp_scsi: use strong typing for the dev field

2018-10-10 Thread Christoph Hellwig
esp->dev is a void pointer that points either to a struct device, or a struct platform_device. As we can easily get from the device to the platform_device if needed change it to always point to a struct device and properly type the pointer to avoid errors. Signed-off-by: Christoph Hellwig --- d