patacongo opened a new issue #1086:
URL: https://github.com/apache/incubator-nuttx/issues/1086


   This was Issue 178 in the old Bitbucket repository
   
   David Alessio
   created an issue 2019-11-07
   
   SNIOC_START is defined 3 times. Other macros may also be.
   
   Gregory Nutt
   2019-11-07
   
   Certainly SNIOC_STOP is also defined multiple times.
   
   Other than the warnings this produces (and the overall aesthetics), this is 
not really a problem.
   
   The easiest solution would be to add a group of common IOCTL commands at the 
top of the file and move the common definitions.
   
   The commands are, however, only common in name not function. So a more 
proper solution would be rename all of the IOCTL commands, adding the device 
name to the IOCTL command name. That would nicely clean up the namespace (but 
would be a really tedious job). Someone who really cares about sensor drivers 
should take this on someday.
          
   David Alessio
    2019-11-0
   
   The output of awk '/#define/ {print $2}' include/nuttx/sensors/ioctl.h | 
sort | uniq -d is:
   
       SNIOC_MEASURE
       SNIOC_START
       SNIOC_START_SELFTEST
       SNIOC_STOP 
   
   suggested fix: replace all duplicate #define statements with a comment 
similar to: /* SNIOC_START see above */
   
   ioctl cmds need only be unique within a particular driver, they need not be 
unique across all drivers.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to