> > + switch (gen.command.OpCode) {
> > + case GDT_IOCTL:
> > + gen.command.u.ioctl.p_param = paddr;
> > + break;
> > + case CACHESERVICE:
> > + gdth_ioc_cacheservice(ha, , paddr);
> > + break;
> > + case SCSIRAWSERVICE:
> > +
On Thu, 18 Oct 2018, Christoph Hellwig wrote:
> +
> +static int ioc_general(void __user *arg, char *cmnd)
> +{
> + gdth_ioctl_general gen;
> + gdth_ha_str *ha;
> + char *buf = NULL;
> + u64 paddr;
> + int rval;
> +
> + if (copy_from_user(, arg, sizeof(gdth_ioctl_general)))
This function is a huge mess with duplicated error handling. Split out
a few useful helpers and use goto labels to untangle the error handling
and no-data ioctl handling.
Signed-off-by: Christoph Hellwig
---
drivers/scsi/gdth.c | 247 +++-
1 file
3 matches
Mail list logo