summaryrefslogtreecommitdiff
path: root/drivers/staging/gpib/common
AgeCommit message (Collapse)Author
2024-11-10Staging: gpib: gpib_os.c - Remove unnecessary OOM messageOmer Faruk BULUT
It dublicate the MM subsystem generic OOM message. This patch fixes the following checkpatch warning. WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Omer Faruk BULUT <m.omerfarukbulut@gmail.com> Link: https://lore.kernel.org/r/20241109130554.3652-1-m.omerfarukbulut@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-07staging: gpib: Correct check for max secondary addressDave Penkler
GPIB secondary addresses can be between 0 and 31 inclusive unlike primary addresses where address 31 is not a valid device address. When 31 is used as a primary talk address it forms the UNT (Untalk) command and when used as a listener address it forms the UNL (Unlisten) commmand. The library was incorrectly not allowing a secondary address with a value of 31 to be used. Fixes: 9dde4559e939 ("staging: gpib: Add GPIB common core driver") Signed-off-by: Dave Penkler <dpenkler@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20241104175014.12317-13-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-07staging: gpib: Replace custom debug with dev_dbgDave Penkler
Remove GPIB_KERNEL_DEBUG config option Remove GPIB_DEBUG reference Replace GPIB_DPRINTK with dev_dbg Change pr_alert to dev_alert Signed-off-by: Dave Penkler <dpenkler@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20241104175014.12317-3-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-19staging: gpib: use proper format string in request_moduleArnd Bergmann
Using a string variable as a format causes a -Wformat-security warning. Since the only use of the temporary module_string[] is to hold the sprintf() output, just pass the format string and argument directly to request_module(). Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20241016111521.1143191-7-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-19staging: gpib: make port I/O code conditionalArnd Bergmann
A few of the helper modules contain functions for both IORESOURCE_MEM and IORESOURCE_IO type access, with the latter not being supported on all architectures but also not used by all the drivers. Add #ifdef checks around these to allow building the library code and use it on MMIO-only configurations. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20241016111521.1143191-5-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-19staging: gpib: avoid unused const variablesArnd Bergmann
Variables that are 'static const' but not used anywhere cause a warning with "gcc -Wunused-const-variable", which we may want to enable by default in the future. The gpib code already has a mix of 'enum' and 'static const' variables for named constants, so convert the ones that are causing problems to enums as well, or move them closer to the only users where possible. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20241016111521.1143191-3-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-19staging: gpib: add module descriptionsArnd Bergmann
Every loadable module should have a description, and not having one causes a W=1 build warning, so add these to the newly added modules. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20241016111521.1143191-2-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-10staging: gpib: Add GPIB common core driverDave Penkler
This is the common core driver that interfaces with the userland code and creates the gpib device files. Signed-off-by: Dave Penkler <dpenkler@gmail.com> Link: https://lore.kernel.org/r/20240918121908.19366-6-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>