[PATCH 03/32] staging: comedi: comedidev.h: checkpatch.pl cleanup (else after return)
H Hartley Sweeten
hsweeten at visionengravers.com
Wed Jul 16 17:43:14 UTC 2014
Fix the checkpatch.pl warning in this file:
WARNING: else is not generally useful after a break or return
Also, for aesthetics, rename the comedi_subdevice parameter from
'subd' to 's' since this is the norm for comedi source files.
Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregk at linuxfoundation.org>
---
drivers/staging/comedi/comedidev.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 6af6467..53095bc 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -397,12 +397,12 @@ static inline unsigned int comedi_offset_munge(struct comedi_subdevice *s,
return val ^ s->maxdata ^ (s->maxdata >> 1);
}
-static inline unsigned int bytes_per_sample(const struct comedi_subdevice *subd)
+static inline unsigned int bytes_per_sample(const struct comedi_subdevice *s)
{
- if (subd->subdev_flags & SDF_LSAMPL)
+ if (s->subdev_flags & SDF_LSAMPL)
return sizeof(unsigned int);
- else
- return sizeof(short);
+
+ return sizeof(short);
}
/*
--
1.9.3
More information about the devel
mailing list