An error occurred fetching the project authors.
- 09 Sep, 2020 2 commits
-
-
Manish Rangankar authored
Use snprintf to limit max number of bytes to the buffer. Link: https://lore.kernel.org/r/20200908095657.26821-6-mrangankar@marvell.comSigned-off-by:
Manish Rangankar <mrangankar@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Manish Rangankar authored
To avoid unnecessary vector allocation when the number of fast-path queues is less then available msix vectors, use return count from module qed->set_fp_int. Link: https://lore.kernel.org/r/20200908095657.26821-2-mrangankar@marvell.comSigned-off-by:
Manish Rangankar <mrangankar@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 02 Sep, 2020 1 commit
-
-
Xu Wang authored
kfree_skb() handles a NULL skb argument so the additional check is unnecessary. Remove it. Link: https://lore.kernel.org/r/20200827092606.32148-1-vulab@iscas.ac.cnSigned-off-by:
Xu Wang <vulab@iscas.ac.cn> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 25 Jul, 2020 2 commits
-
-
Lee Jones authored
This is the only use of kerneldoc in the source file and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/scsi/qedi/qedi_main.c:1969: warning: Function parameter or member 'qedi' not described in 'qedi_get_nvram_block' Link: https://lore.kernel.org/r/20200723122446.1329773-37-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@cavium.com Signed-off-by:
Lee Jones <lee.jones@linaro.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Lee Jones authored
Fixes the following W=1 kernel build warning(s): drivers/scsi/qedi/qedi_main.c: In function ‘qedi_queue_cqe’: drivers/scsi/qedi/qedi_main.c:1158:21: warning: variable ‘conn’ set but not used [-Wunused-but-set-variable] 1158 | struct iscsi_conn *conn; | ^~~~ drivers/scsi/qedi/qedi_main.c: In function ‘__qedi_probe’: drivers/scsi/qedi/qedi_main.c:2432:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] 2432 | u16 tmp; | ^~~ Link: https://lore.kernel.org/r/20200723122446.1329773-12-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@cavium.com Signed-off-by:
Lee Jones <lee.jones@linaro.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 12 May, 2020 1 commit
-
-
Xie XiuQi authored
uctrl and udev are unused after commit 9632a6b4 ("scsi: qedi: Move LL2 producer index processing in BH.") Remove them. Link: https://lore.kernel.org/r/20200505121904.25702-1-xiexiuqi@huawei.comReviewed-by:
Lee Duncan <lduncan@suse.com> Signed-off-by:
Xie XiuQi <xiexiuqi@huawei.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 08 May, 2020 1 commit
-
-
Jason Yan authored
Fix the following coccicheck warning: drivers/scsi/qedi/qedi_main.c:1309:5-25: WARNING: Comparison of 0/1 to bool variable drivers/scsi/qedi/qedi_main.c:1315:5-25: WARNING: Comparison of 0/1 to bool variable Link: https://lore.kernel.org/r/20200430121706.14879-1-yanaijie@huawei.comAcked-by:
Manish Rangankar <mrangankar@marvell.com> Signed-off-by:
Jason Yan <yanaijie@huawei.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 17 Apr, 2020 1 commit
-
-
Jason Yan authored
Fix the following sparse warning: drivers/scsi/qedi/qedi_main.c:44:6: warning: symbol 'qedi_ll2_buf_size' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200415085029.7170-1-yanaijie@huawei.comReported-by:
Hulk Robot <hulkci@huawei.com> Signed-off-by:
Jason Yan <yanaijie@huawei.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 14 Apr, 2020 3 commits
-
-
Manish Rangankar authored
Add module parameter to enable debug messages specific to iSCSI functions. Link: https://lore.kernel.org/r/20200408064332.19377-6-mrangankar@marvell.comReviewed-by:
Lee Duncan <lduncan@suse.com> Signed-off-by:
Manish Rangankar <mrangankar@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Manish Rangankar authored
Use MSI-X count provided by qed. Link: https://lore.kernel.org/r/20200408064332.19377-4-mrangankar@marvell.comReviewed-by:
Lee Duncan <lduncan@suse.com> Signed-off-by:
Manish Rangankar <mrangankar@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Manish Rangankar authored
While parsing the iSCSI TLV data to MFW request, a newline was added to the firmware boot target iqnname string. Because of this, we were getting the following error even after the boot target was successfully logged in: "[qedi_get_protocol_tlv_data:1197]:1: Boot target not set" Remove the trailing newline. [mkp: clarified commit desc] Link: https://lore.kernel.org/r/20200408064332.19377-2-mrangankar@marvell.comReviewed-by:
Lee Duncan <lduncan@suse.com> Signed-off-by:
Manish Rangankar <mrangankar@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 27 Mar, 2020 2 commits
-
-
Manish Rangankar authored
Add PCI shutdown handler support for supporting wake-on-lan feature. Link: https://lore.kernel.org/r/20200319083811.19499-3-mrangankar@marvell.comSigned-off-by:
Manish Rangankar <mrangankar@marvell.com> Signed-off-by:
Nilesh Javali <njavali@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Manish Rangankar authored
This patch adds the mfw error recovery process in the qedi driver. The process includes a partial/customized driver unload and load to reset context by preserving active iSCSI session kernel state. Link: https://lore.kernel.org/r/20200319083811.19499-2-mrangankar@marvell.comSigned-off-by:
Manish Rangankar <mrangankar@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 19 Jun, 2019 1 commit
-
-
Nilesh Javali authored
The kernel panic was observed during iSCSI discovery via offload with below call trace, [ 2115.646901] BUG: unable to handle kernel NULL pointer dereference at (null) [ 2115.646909] IP: [<ffffffffacf7f0cc>] strncmp+0xc/0x60 [ 2115.646927] PGD 0 [ 2115.646932] Oops: 0000 [#1] SMP [ 2115.647107] CPU: 24 PID: 264 Comm: kworker/24:1 Kdump: loaded Tainted: G OE ------------ 3.10.0-957.el7.x86_64 #1 [ 2115.647133] Workqueue: slowpath-13:00. qed_slowpath_task [qed] [ 2115.647135] task: ffff8d66af80b0c0 ti: ffff8d66afb80000 task.ti: ffff8d66afb80000 [ 2115.647136] RIP: 0010:[<ffffffffacf7f0cc>] [<ffffffffacf7f0cc>] strncmp+0xc/0x60 [ 2115.647141] RSP: 0018:ffff8d66afb83c68 EFLAGS: 00010206 [ 2115.647143] RAX: 0000000000000001 RBX: 0000000000000007 RCX: 000000000000000a [ 2115.647144] RDX: 0000000000000100 RSI: 0000000000000000 RDI: ffff8d632b3ba040 [ 2115.647145] RBP: ffff8d66afb83c68 R08: 0000000000000000 R09: 000000000000ffff [ 2115.647147] R10: 0000000000000007 R11: 0000000000000800 R12: ffff8d66a30007a0 [ 2115.647148] R13: ffff8d66747a3c10 R14: ffff8d632b3ba000 R15: ffff8d66747a32f8 [ 2115.647149] FS: 0000000000000000(0000) GS:ffff8d66aff00000(0000) knlGS:0000000000000000 [ 2115.647151] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2115.647152] CR2: 0000000000000000 CR3: 0000000509610000 CR4: 00000000007607e0 [ 2115.647153] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2115.647154] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2115.647155] PKRU: 00000000 [ 2115.647157] Call Trace: [ 2115.647165] [<ffffffffc0634cc5>] qedi_get_protocol_tlv_data+0x2c5/0x510 [qedi] [ 2115.647184] [<ffffffffc05968f5>] ? qed_mfw_process_tlv_req+0x245/0xbe0 [qed] [ 2115.647195] [<ffffffffc05496cb>] qed_mfw_fill_tlv_data+0x4b/0xb0 [qed] [ 2115.647206] [<ffffffffc0596911>] qed_mfw_process_tlv_req+0x261/0xbe0 [qed] [ 2115.647215] [<ffffffffacce0e8e>] ? dequeue_task_fair+0x41e/0x660 [ 2115.647221] [<ffffffffacc2a59e>] ? __switch_to+0xce/0x580 [ 2115.647230] [<ffffffffc0546013>] qed_slowpath_task+0xa3/0x160 [qed] [ 2115.647278] RIP [<ffffffffacf7f0cc>] strncmp+0xc/0x60 Fix kernel panic by validating the session targetname before providing TLV data and confirming the presence of boot targets. Signed-off-by:
Nilesh Javali <njavali@marvell.com> Reviewed-by:
Lee Duncan <lduncan@suse.com> Reviewed-by:
Chris Leech <cleech@redhat.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 05 Jun, 2019 1 commit
-
-
Thomas Gleixner authored
Based on 1 normalized pattern(s): this software is available under the terms of the gnu general public license gpl version 2 available from the file copying in the main directory of this source tree extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 35 file(s). Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Reviewed-by:
Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190531190115.411886531@linutronix.deSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 26 May, 2019 2 commits
-
-
Manish Rangankar authored
MSI-X vector index is determined using qed device information and affinity to use. Signed-off-by:
Manish Rangankar <mrangankar@marvell.com> Signed-off-by:
Ariel Elior <ariel.elior@marvell.com> Signed-off-by:
Michal Kalderon <michal.kalderon@marvell.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Manish Rangankar authored
Always request for number of irqs equals to number of queues. This reverts commit 1a291bce. Signed-off-by:
Manish Rangankar <mrangankar@marvell.com> Signed-off-by:
Ariel Elior <ariel.elior@marvell.com> Signed-off-by:
Michal Kalderon <michal.kalderon@marvell.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 29 Mar, 2019 1 commit
-
-
Colin Ian King authored
The nvm_image is a large struct qedi_nvm_iscsi_image object of over 24K so don't declare it on the stack just for a sizeof requirement; use sizeof on struct qedi_nvm_iscsi_image instead. Fixes: c77a2fa3 ("scsi: qedi: Add the CRC size within iSCSI NVM image") Signed-off-by:
Colin Ian King <colin.king@canonical.com> Acked-by:
Manish Rangankar <mrangankar@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 08 Jan, 2019 1 commit
-
-
Luis Chamberlain authored
We already need to zero out memory for dma_alloc_coherent(), as such using dma_zalloc_coherent() is superflous. Phase it out. This change was generated with the following Coccinelle SmPL patch: @ replace_dma_zalloc_coherent @ expression dev, size, data, handle, flags; @@ -dma_zalloc_coherent(dev, size, handle, flags) +dma_alloc_coherent(dev, size, handle, flags) Suggested-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Luis Chamberlain <mcgrof@kernel.org> [hch: re-ran the script on the latest tree] Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
- 29 Nov, 2018 7 commits
-
-
Manish Rangankar authored
1. Removed logic to update HW producer index in interrupt context. 2. Update HW producer index after UIO ring and buffer gets initialized. Signed-off-by:
Manish Rangankar <manish.rangankar@cavium.com> Reviewed-by:
Lee Duncan <lduncan@suse.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Nilesh Javali authored
Default packet size is 0x400. For jumbo packets set to 0x2400. Signed-off-by:
Nilesh Javali <nilesh.javali@cavium.com> Reviewed-by:
Lee Duncan <lduncan@suse.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Manish Rangankar authored
Add packet filter to avoid unnecessary packet processing in iscsiuio. Signed-off-by:
Manish Rangankar <manish.rangankar@cavium.com> Reviewed-by:
Lee Duncan <lduncan@suse.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Manish Rangankar authored
The kernel panic was observed after switch side perturbation, BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<ffffffff8132b5a0>] strcmp+0x20/0x40 PGD 0 Oops: 0000 [#1] SMP CPU: 8 PID: 647 Comm: kworker/8:1 Tainted: G W OE ------------ 3.10.0-693.el7.x86_64 #1 Hardware name: HPE ProLiant DL380 Gen10/ProLiant DL380 Gen10, BIOS U30 06/20/2018 Workqueue: slowpath-13:00. qed_slowpath_task [qed] task: ffff880429eb8fd0 ti: ffff880429190000 task.ti: ffff880429190000 RIP: 0010:[<ffffffff8132b5a0>] [<ffffffff8132b5a0>] strcmp+0x20/0x40 RSP: 0018:ffff880429193c68 EFLAGS: 00010202 RAX: 000000000000000a RBX: 0000000000000002 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000001 RDI: ffff88042bda7a41 RBP: ffff880429193c68 R08: 000000000000ffff R09: 000000000000ffff R10: 0000000000000007 R11: ffff88042b3af338 R12: ffff880420b007a0 R13: ffff88081aa56af8 R14: 0000000000000001 R15: ffff88081aa50410 FS: 0000000000000000(0000) GS:ffff88042fe00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000000019f2000 CR4: 00000000003407e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffff880429193d20 ffffffffc02a0c90 ffffc90004b32000 ffff8803fd3ec600 ffff88042bda7800 ffff88042bda7a00 ffff88042bda7840 ffff88042bda7a40 0000000129193d10 2e3836312e323931 ff000a342e363232 ffffffffc01ad99d Call Trace: [<ffffffffc02a0c90>] qedi_get_protocol_tlv_data+0x270/0x470 [qedi] [<ffffffffc01ad99d>] ? qed_mfw_process_tlv_req+0x24d/0xbf0 [qed] [<ffffffffc01653ae>] qed_mfw_fill_tlv_data+0x5e/0xd0 [qed] [<ffffffffc01ad9b9>] qed_mfw_process_tlv_req+0x269/0xbf0 [qed] Fix kernel NULL pointer deref by checking for session is online before getting iSCSI TLV data. Signed-off-by:
Manish Rangankar <manish.rangankar@cavium.com> Reviewed-by:
Lee Duncan <lduncan@suse.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Nilesh Javali authored
The driver load on some systems failed with error, [0004:01:00.5]:[qedi_request_msix_irq:2524]:8: request_irq failed. Allocate the IRQs based on MSIX count obtained from qed module instead of number of queues. Signed-off-by:
Nilesh Javali <nilesh.javali@cavium.com> Reviewed-by:
Lee Duncan <lduncan@suse.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Nilesh Javali authored
Use QEDI_PAGE_SIZE for enablement of module on systems with 64K page size. Signed-off-by:
Nilesh Javali <nilesh.javali@cavium.com> Reviewed-by:
Lee Duncan <lduncan@suse.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Nilesh Javali authored
Fix trivial spelling mistake within macro definition. Signed-off-by:
Nilesh Javali <nilesh.javali@cavium.com> Reviewed-by:
Lee Duncan <lduncan@suse.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 07 Nov, 2018 1 commit
-
-
Jens Axboe authored
This removes the legacy (non-mq) IO path for SCSI. Cc: linux-scsi@vger.kernel.org Acked-by:
Himanshu Madhani <himanshu.madhani@cavium.com> Reviewed-by:
Hannes Reinecke <hare@suse.com> Tested-by:
Ming Lei <ming.lei@redhat.com> Reviewed-by:
Omar Sandoval <osandov@fb.com> Acked-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
- 18 Oct, 2018 1 commit
-
-
Christoph Hellwig authored
The driver is currently using an odd mix of legacy PCI DMA API and generic DMA API calls, switch it over to the generic API entirely. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Johannes Thumshirn <jthumshirn@suse.de> Acked-by:
Manish Rangankar <Manish.Rangankar@cavium.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 28 Sep, 2018 1 commit
-
-
Nilesh Javali authored
Fix kernel NULL pointer dereference, Call Trace: [<ffffffff9b7658e6>] __mutex_lock_slowpath+0xa6/0x1d0 [<ffffffff9b764cef>] mutex_lock+0x1f/0x2f [<ffffffffc061b5e1>] qedi_get_protocol_tlv_data+0x61/0x450 [qedi] [<ffffffff9b1f9d8e>] ? map_vm_area+0x2e/0x40 [<ffffffff9b1fc370>] ? __vmalloc_node_range+0x170/0x280 [<ffffffffc0b81c3d>] ? qed_mfw_process_tlv_req+0x27d/0xbd0 [qed] [<ffffffffc0b6461b>] qed_mfw_fill_tlv_data+0x4b/0xb0 [qed] [<ffffffffc0b81c59>] qed_mfw_process_tlv_req+0x299/0xbd0 [qed] [<ffffffff9b02a59e>] ? __switch_to+0xce/0x580 [<ffffffffc0b61e5b>] qed_slowpath_task+0x5b/0x80 [qed] Signed-off-by:
Nilesh Javali <nilesh.javali@cavium.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 30 Aug, 2018 1 commit
-
-
Nilesh Javali authored
The QED driver commit, 1ac4329a ("qed: Add configuration information to register dump and debug data"), removes the CRC length validation causing nvm_get_image failure while loading qedi driver: [qed_mcp_get_nvm_image:2700(host_10-0)]Image [0] is too big - 00006008 bytes where only 00006004 are available [qedi_get_boot_info:2253]:10: Could not get NVM image. ret = -12 Hence add and adjust the CRC size to iSCSI NVM image to read boot info at qedi load time. Signed-off-by:
Nilesh Javali <nilesh.javali@cavium.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 31 Jul, 2018 1 commit
-
-
Bart Van Assche authored
Tell snprintf() to store at most 255 characters in the output buffer instead of 256. This patch avoids that smatch reports the following warning: drivers/scsi/qedi/qedi_main.c:891: qedi_get_boot_tgt_info() error: snprintf() is printing too much 256 vs 255 Signed-off-by:
Bart Van Assche <bart.vanassche@wdc.com> Cc: <QLogic-Storage-Upstream@cavium.com> Cc: <stable@vger.kernel.org> Acked-by:
Nilesh Javali <nilesh.javali@cavium.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 11 Jul, 2018 1 commit
-
-
Manish Rangankar authored
In case of iSCSI offload BFS environment, MFW requires to mark virtual link based upon qedi load status. Signed-off-by:
Manish Rangankar <manish.rangankar@qlogic.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 02 Jul, 2018 1 commit
-
-
Dan Carpenter authored
The id_tbl->table pointer points to unsigned long so static checkers complain that instead of 4 we should be allocating sizeof(long) bytes. We're trying to allocate enough bits for the bitmap. The size variable is always 1024. (1024 / 32 * 4) is the same as (1024 / 64 * 8) so this doesn't change runtime, but this is the more idiomatic way to do it and makes the static checker happy. [mkp: typo] Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Acked-by:
Manish Rangankar <Manish.Rangankar@cavium.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 12 Jun, 2018 1 commit
-
-
Kees Cook authored
The kzalloc() function has a 2-factor argument form, kcalloc(). This patch replaces cases of: kzalloc(a * b, gfp) with: kcalloc(a * b, gfp) as well as handling cases of: kzalloc(a * b * c, gfp) with: kzalloc(array3_size(a, b, c), gfp) as it's slightly less ugly than: kzalloc_array(array_size(a, b), c, gfp) This does, however, attempt to ignore constant size factors like: kzalloc(4 * 1024, gfp) though any constants defined via macros get caught up in the conversion. Any factors with a sizeof() of "unsigned char", "char", and "u8" were dropped, since they're redundant. The Coccinelle script used for this was: // Fix redundant parens around sizeof(). @@ type TYPE; expression THING, E; @@ ( kzalloc( - (sizeof(TYPE)) * E + sizeof(TYPE) * E , ...) | kzalloc( - (sizeof(THING)) * E + sizeof(THING) * E , ...) ) // Drop single-byte sizes and redundant parens. @@ expression COUNT; typedef u8; typedef __u8; @@ ( kzalloc( - sizeof(u8) * (COUNT) + COUNT , ...) | kzalloc( - sizeof(__u8) * (COUNT) + COUNT , ...) | kzalloc( - sizeof(char) * (COUNT) + COUNT , ...) | kzalloc( - sizeof(unsigned char) * (COUNT) + COUNT , ...) | kzalloc( - sizeof(u8) * COUNT + COUNT , ...) | kzalloc( - sizeof(__u8) * COUNT + COUNT , ...) | kzalloc( - sizeof(char) * COUNT + COUNT , ...) | kzalloc( - sizeof(unsigned char) * COUNT + COUNT , ...) ) // 2-factor product with sizeof(type/expression) and identifier or constant. @@ type TYPE; expression THING; identifier COUNT_ID; constant COUNT_CONST; @@ ( - kzalloc + kcalloc ( - sizeof(TYPE) * (COUNT_ID) + COUNT_ID, sizeof(TYPE) , ...) | - kzalloc + kcalloc ( - sizeof(TYPE) * COUNT_ID + COUNT_ID, sizeof(TYPE) , ...) | - kzalloc + kcalloc ( - sizeof(TYPE) * (COUNT_CONST) + COUNT_CONST, sizeof(TYPE) , ...) | - kzalloc + kcalloc ( - sizeof(TYPE) * COUNT_CONST + COUNT_CONST, sizeof(TYPE) , ...) | - kzalloc + kcalloc ( - sizeof(THING) * (COUNT_ID) + COUNT_ID, sizeof(THING) , ...) | - kzalloc + kcalloc ( - sizeof(THING) * COUNT_ID + COUNT_ID, sizeof(THING) , ...) | - kzalloc + kcalloc ( - sizeof(THING) * (COUNT_CONST) + COUNT_CONST, sizeof(THING) , ...) | - kzalloc + kcalloc ( - sizeof(THING) * COUNT_CONST + COUNT_CONST, sizeof(THING) , ...) ) // 2-factor product, only identifiers. @@ identifier SIZE, COUNT; @@ - kzalloc + kcalloc ( - SIZE * COUNT + COUNT, SIZE , ...) // 3-factor product with 1 sizeof(type) or sizeof(expression), with // redundant parens removed. @@ expression THING; identifier STRIDE, COUNT; type TYPE; @@ ( kzalloc( - sizeof(TYPE) * (COUNT) * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | kzalloc( - sizeof(TYPE) * (COUNT) * STRIDE + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | kzalloc( - sizeof(TYPE) * COUNT * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | kzalloc( - sizeof(TYPE) * COUNT * STRIDE + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | kzalloc( - sizeof(THING) * (COUNT) * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) | kzalloc( - sizeof(THING) * (COUNT) * STRIDE + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) | kzalloc( - sizeof(THING) * COUNT * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) | kzalloc( - sizeof(THING) * COUNT * STRIDE + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) ) // 3-factor product with 2 sizeof(variable), with redundant parens removed. @@ expression THING1, THING2; identifier COUNT; type TYPE1, TYPE2; @@ ( kzalloc( - sizeof(TYPE1) * sizeof(TYPE2) * COUNT + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2)) , ...) | kzalloc( - sizeof(TYPE1) * sizeof(THING2) * (COUNT) + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2)) , ...) | kzalloc( - sizeof(THING1) * sizeof(THING2) * COUNT + array3_size(COUNT, sizeof(THING1), sizeof(THING2)) , ...) | kzalloc( - sizeof(THING1) * sizeof(THING2) * (COUNT) + array3_size(COUNT, sizeof(THING1), sizeof(THING2)) , ...) | kzalloc( - sizeof(TYPE1) * sizeof(THING2) * COUNT + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2)) , ...) | kzalloc( - sizeof(TYPE1) * sizeof(THING2) * (COUNT) + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2)) , ...) ) // 3-factor product, only identifiers, with redundant parens removed. @@ identifier STRIDE, SIZE, COUNT; @@ ( kzalloc( - (COUNT) * STRIDE * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) | kzalloc( - COUNT * (STRIDE) * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) | kzalloc( - COUNT * STRIDE * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | kzalloc( - (COUNT) * (STRIDE) * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) | kzalloc( - COUNT * (STRIDE) * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | kzalloc( - (COUNT) * STRIDE * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | kzalloc( - (COUNT) * (STRIDE) * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | kzalloc( - COUNT * STRIDE * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) ) // Any remaining multi-factor products, first at least 3-factor products, // when they're not all constants... @@ expression E1, E2, E3; constant C1, C2, C3; @@ ( kzalloc(C1 * C2 * C3, ...) | kzalloc( - (E1) * E2 * E3 + array3_size(E1, E2, E3) , ...) | kzalloc( - (E1) * (E2) * E3 + array3_size(E1, E2, E3) , ...) | kzalloc( - (E1) * (E2) * (E3) + array3_size(E1, E2, E3) , ...) | kzalloc( - E1 * E2 * E3 + array3_size(E1, E2, E3) , ...) ) // And then all remaining 2 factors products when they're not all constants, // keeping sizeof() as the second factor argument. @@ expression THING, E1, E2; type TYPE; constant C1, C2, C3; @@ ( kzalloc(sizeof(THING) * C2, ...) | kzalloc(sizeof(TYPE) * C2, ...) | kzalloc(C1 * C2 * C3, ...) | kzalloc(C1 * C2, ...) | - kzalloc + kcalloc ( - sizeof(TYPE) * (E2) + E2, sizeof(TYPE) , ...) | - kzalloc + kcalloc ( - sizeof(TYPE) * E2 + E2, sizeof(TYPE) , ...) | - kzalloc + kcalloc ( - sizeof(THING) * (E2) + E2, sizeof(THING) , ...) | - kzalloc + kcalloc ( - sizeof(THING) * E2 + E2, sizeof(THING) , ...) | - kzalloc + kcalloc ( - (E1) * E2 + E1, E2 , ...) | - kzalloc + kcalloc ( - (E1) * (E2) + E1, E2 , ...) | - kzalloc + kcalloc ( - E1 * E2 + E1, E2 , ...) ) Signed-off-by:
Kees Cook <keescook@chromium.org>
-
- 23 May, 2018 2 commits
-
-
Manish Rangankar authored
Signed-off-by:
Manish Rangankar <manish.rangankar@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Manish Rangankar authored
This patch adds callbacks for providing the ethernet protocol driver TLVs. Signed-off-by:
Manish Rangankar <manish.rangankar@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 14 Feb, 2018 3 commits
-
-
Arnd Bergmann authored
When link-time optimizations are enabled, qedi fails to build because of mismatched prototypes: drivers/scsi/qedi/qedi_gbl.h:27:37: error: type of 'qedi_dbg_fops' does not match original declaration [-Werror=lto-type-mismatch] extern const struct file_operations qedi_dbg_fops; ^ drivers/scsi/qedi/qedi_debugfs.c:239:30: note: 'qedi_dbg_fops' was previously declared here const struct file_operations qedi_dbg_fops[] = { ^ drivers/scsi/qedi/qedi_gbl.h:26:32: error: type of 'qedi_debugfs_ops' does not match original declaration [-Werror=lto-type-mismatch] extern struct qedi_debugfs_ops qedi_debugfs_ops; ^ drivers/scsi/qedi/qedi_debugfs.c:102:25: note: 'qedi_debugfs_ops' was previously declared here struct qedi_debugfs_ops qedi_debugfs_ops[] = { This changes the declaration to match the definition, and adapts the users as necessary. Since both array can be constant here, I'm adding the 'const' everywhere for consistency. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
Manish Rangankar <Manish.Rangankar@cavium.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Nilesh Javali authored
Signed-off-by:
Nilesh Javali <nilesh.javali@cavium.com> Reviewed-by:
Bart Van Assche <bart.vanassche@wdc.com> Acked-by:
Chris Leech <cleech@redhat.com> Acked-by:
Lee Duncan <lduncan@suse.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Andrew Vasquez authored
The data in NVRAM is not guaranteed to be NUL terminated. Since snprintf expects byte-stream to accommodate null byte, the CHAP secret is truncated. Use sprintf instead of snprintf to fix the truncation of CHAP name and secret. Signed-off-by:
Andrew Vasquez <andrew.vasquez@cavium.com> Signed-off-by:
Nilesh Javali <nilesh.javali@cavium.com> Reviewed-by:
Bart Van Assche <bart.vanassche@wdc.com> Acked-by:
Chris Leech <cleech@redhat.com> Acked-by:
Lee Duncan <lduncan@suse.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 23 Jan, 2018 1 commit
-
-
Manish Rangankar authored
We get stuck in the loop when firmware sends a cqe response during connection recovery. Signed-off-by:
Manish Rangankar <manish.rangankar@cavium.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-