similar to: [PATCH] scsi: virtio_scsi: remove unnecessary condition check

Displaying 20 results from an estimated 5000 matches similar to: "[PATCH] scsi: virtio_scsi: remove unnecessary condition check"

2020 Jul 09
0
[PATCH] scsi: virtio_scsi: remove unnecessary condition check
On 09/07/20 17:06, Xianting Tian wrote: > kmem_cache_destroy and mempool_destroy can correctly handle > null pointer parameter, so there is no need to check if the > parameter is null before calling kmem_cache_destroy and > mempool_destroy. > > Signed-off-by: Xianting Tian <xianting_tian at 126.com> > --- > drivers/scsi/virtio_scsi.c | 12 ++++-------- > 1 file
2020 Jul 09
0
[PATCH] scsi: virtio_scsi: remove unnecessary condition check
On 09/07/20 16:46, Xianting Tian wrote: > kmem_cache_destroy can correctly handle null pointer parameter, > so there is no need to check if the parameter is null before > calling kmem_cache_destroy. > > Signed-off-by: Xianting Tian <xianting_tian at 126.com> > --- > drivers/scsi/virtio_scsi.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > >
2020 Jul 10
0
[PATCH] scsi: virtio_scsi: Remove unnecessary condition checks
On 10/07/20 08:32, Markus Elfring wrote: >>>> + mempool_destroy(virtscsi_cmd_pool); >>>> + virtscsi_cmd_pool = NULL; >>>> + kmem_cache_destroy(virtscsi_cmd_cache); >>>> + virtscsi_cmd_cache = NULL; >>>> return ret; >>>> } >>> >>> How do you think about to add a jump target so that the execution
2020 Jul 09
0
[PATCH] scsi: virtio_scsi: Remove unnecessary condition checks
On 09/07/20 19:16, Markus Elfring wrote: >> + mempool_destroy(virtscsi_cmd_pool); >> + virtscsi_cmd_pool = NULL; >> + kmem_cache_destroy(virtscsi_cmd_cache); >> + virtscsi_cmd_cache = NULL; >> return ret; >> } > > How do you think about to add a jump target so that the execution > of a few statements can be avoided according to a previous > null
2023 Jun 10
0
[PATCH 1/3] virtio-crypto: fixup potential cpu stall when free unused bufs
On Sat, Jun 10, 2023 at 11:20:49AM +0800, Xianting Tian wrote: > > ? 2023/6/9 ??11:57, Michael S. Tsirkin ??: > > On Fri, Jun 09, 2023 at 09:18:15PM +0800, Xianting Tian wrote: > > > From: Xianting Tian <tianxianting.txt at alibaba-inc.com> > > > > > > Cpu stall issue may happen if device is configured with multi queues > > > and large queue
2020 Jul 10
0
[PATCH] scsi: virtio_scsi: Remove unnecessary condition checks
On 10/07/20 09:40, Markus Elfring wrote: >>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/scsi/virtio_scsi.c?id=42f82040ee66db13525dc6f14b8559890b2f4c1c#n980 >>> >>> if (!virtscsi_cmd_cache) { >>> pr_err("kmem_cache_create() for virtscsi_cmd_cache failed\n"); >>> - goto error; >>> + return
2019 Jul 12
0
[PATCH] scsi: virtio_scsi: Use struct_size() helper
Gustavo, > One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: Applied to 5.4/scsi-queue, thanks! -- Martin K. Petersen Oracle Linux Engineering
2019 Sep 11
0
[PATCH v2] scsi: virtio_scsi: unplug LUNs when events missed
Matt, > The event handler calls scsi_scan_host() when events are missed, which > will hotplug new LUNs. However, this function won't remove any > unplugged LUNs. The result is that hotunplug doesn't work properly > when the number of unplugged LUNs exceeds the event queue size > (currently 8). > > Scan existing LUNs when events are missed to check if they are still
2019 Jun 19
3
[PATCH] scsi: virtio_scsi: Use struct_size() helper
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct virtio_scsi { ... struct virtio_scsi_vq req_vqs[]; }; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes.
2019 Jun 19
3
[PATCH] scsi: virtio_scsi: Use struct_size() helper
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct virtio_scsi { ... struct virtio_scsi_vq req_vqs[]; }; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes.
2013 Mar 07
3
[PATCH 1/2] virtio-scsi: use pr_err() instead of printk()
Convert the virtio-scsi driver to use pr_err() instead of printk(). Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- drivers/scsi/virtio_scsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 612e320..f679b8c 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@
2013 Mar 07
3
[PATCH 1/2] virtio-scsi: use pr_err() instead of printk()
Convert the virtio-scsi driver to use pr_err() instead of printk(). Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- drivers/scsi/virtio_scsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 612e320..f679b8c 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@
2020 Sep 22
0
[PATCH] Rescan the entire target on transport reset when LUN is 0
On Fri, 28 Aug 2020 12:21:35 +0000, Matej Genci wrote: > VirtIO 1.0 spec says > The removed and rescan events ... when sent for LUN 0, they MAY > apply to the entire target so the driver can ask the initiator > to rescan the target to detect this. > > This change introduces the behaviour described above by scanning the > entire scsi target when LUN is set to 0.
2019 Jun 19
2
[PATCH 1/1] scsi: virtio_scsi: remove unused 'affinity_hint_set'
The 'affinity_hint_set' is not used any longer since commit 0d9f0a52c8b9 ("virtio_scsi: use virtio IRQ affinity"). Signed-off-by: Dongli Zhang <dongli.zhang at oracle.com> --- drivers/scsi/virtio_scsi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 13f1b3b..1705398 100644 ---
2014 Apr 07
3
[PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD
On Sun, Apr 06, 2014 at 09:32:09PM +0000, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger <nab at linux-iscsi.org> > > This patch updates virtscsi_probe() to setup necessary Scsi_Host > level protection resources. (currently hardcoded to 1) > > It changes virtscsi_add_cmd() to attach outgoing / incoming > protection SGLs preceeding the data payload, and is
2014 Apr 07
3
[PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD
On Sun, Apr 06, 2014 at 09:32:09PM +0000, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger <nab at linux-iscsi.org> > > This patch updates virtscsi_probe() to setup necessary Scsi_Host > level protection resources. (currently hardcoded to 1) > > It changes virtscsi_add_cmd() to attach outgoing / incoming > protection SGLs preceeding the data payload, and is
2020 Jul 29
3
[PATCH 0/1] virtio-scsi: fix missing unplug events when all LUNs are unplugged at the same time
virtio-scsi currently has limit of 8 outstanding notifications so when more that 8 LUNs are unplugged, some are missed. Commit 5ff843721467 ("scsi: virtio_scsi: unplug LUNs when events missed") Fixed this by checking the 'event overflow' bit and manually scanned the bus to see which LUNs are still there. However there is a corner case when all LUNs are unplugged. In this case
2020 Jun 16
0
[PATCH 00/17] spelling.txt: /decriptors/descriptors/
On Tue, 9 Jun 2020 13:45:53 +0100, Kieran Bingham wrote: > I wouldn't normally go through spelling fixes, but I caught sight of > this typo twice, and then foolishly grepped the tree for it, and saw how > pervasive it was. > > so here I am ... fixing a typo globally... but with an addition in > scripts/spelling.txt so it shouldn't re-appear ;-) > > [...] Applied
2020 Jul 09
1
[PATCH 12/24] scsi: virtio_scsi: Demote seemingly unintentional kerneldoc header
This is the only use of kerneldoc in the sourcefile and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/scsi/virtio_scsi.c:109: warning: Function parameter or member 'vscsi' not described in 'virtscsi_complete_cmd' drivers/scsi/virtio_scsi.c:109: warning: Function parameter or member 'buf' not described in
2019 Sep 04
0
[PATCH] scsi: virtio_scsi: unplug LUNs when events missed
On Tue, Sep 03, 2019 at 05:04:20PM +0000, Matt Lupfer wrote: > The event handler calls scsi_scan_host() when events are missed, which > will hotplug new LUNs. However, this function won't remove any > unplugged LUNs. The result is that hotunplug doesn't work properly when > the number of unplugged LUNs exceeds the event queue size (currently 8). > > Scan existing LUNs