diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2019-08-19 16:29:01 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2019-08-29 15:34:57 +0200 |
commit | 8dec6bd4ef327f48eb790a48cba0e833109d4e41 (patch) | |
tree | 54e67b7e9afd55ebff581e93691ca4196042dc98 /arch/s390/pci/pci_dma.c | |
parent | 759d4899d905c2a491d34987366421aebca359de (diff) | |
download | blackbird-op-linux-8dec6bd4ef327f48eb790a48cba0e833109d4e41.tar.gz blackbird-op-linux-8dec6bd4ef327f48eb790a48cba0e833109d4e41.zip |
s390/pci: avoid using strncmp with hardcoded length
Command line option values passed to __setup callbacks are always
null-terminated and "s390_iommu=" may only accept "strict" as value.
So replace strncmp with strcmp.
While at it also make s390_iommu_setup return 1, which means this
command line option is handled by this callback.
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/pci/pci_dma.c')
-rw-r--r-- | arch/s390/pci/pci_dma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/pci/pci_dma.c b/arch/s390/pci/pci_dma.c index 9e52d1527f71..fb2c7db0164e 100644 --- a/arch/s390/pci/pci_dma.c +++ b/arch/s390/pci/pci_dma.c @@ -674,9 +674,9 @@ EXPORT_SYMBOL_GPL(s390_pci_dma_ops); static int __init s390_iommu_setup(char *str) { - if (!strncmp(str, "strict", 6)) + if (!strcmp(str, "strict")) s390_iommu_strict = 1; - return 0; + return 1; } __setup("s390_iommu=", s390_iommu_setup); |