[PATCH] xen: Kconfig: Fix spelling mistake "Maxmium" -> "Maximum"

2022-10-07 Thread Colin Ian King
There is a spelling mistake in a Kconfig description. Fix it.

Signed-off-by: Colin Ian King 
---
 drivers/xen/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index a65bd92121a5..d5d7c402b651 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -56,7 +56,7 @@ config XEN_MEMORY_HOTPLUG_LIMIT
depends on XEN_HAVE_PVMMU
depends on MEMORY_HOTPLUG
help
- Maxmium amount of memory (in GiB) that a PV guest can be
+ Maximum amount of memory (in GiB) that a PV guest can be
  expanded to when using memory hotplug.
 
  A PV guest can have more memory than this limit if is
-- 
2.37.3




[PATCH] xen/xenbus: Fix spelling mistake "hardward" -> "hardware"

2022-10-04 Thread Colin Ian King
There is a spelling mistake in the module description. Fix it.

Signed-off-by: Colin Ian King 
---
 drivers/xen/xen-pciback/xenbus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c
index bde63ef677b8..d171091eec12 100644
--- a/drivers/xen/xen-pciback/xenbus.c
+++ b/drivers/xen/xen-pciback/xenbus.c
@@ -31,7 +31,7 @@ MODULE_PARM_DESC(passthrough,
"   frontend (for example, a device at 06:01.b will still appear at\n"\
"   06:01.b to the frontend). This is similar to how Xen 2.0.x\n"\
"   exposed PCI devices to its driver domains. This may be required\n"\
-   "   for drivers which depend on finding their hardward in certain\n"\
+   "   for drivers which depend on finding their hardware in certain\n"\
"   bus/slot locations.");
 
 static struct xen_pcibk_device *alloc_pdev(struct xenbus_device *xdev)
-- 
2.37.1




[PATCH] xen-blkback: remove redundant assignment to variable i

2022-03-18 Thread Colin Ian King
Variable i is being assigned a value that is never read, it is being
re-assigned later in a for-loop. The assignment is redundant and can
be removed.

Cleans up clang scan build warning:
drivers/block/xen-blkback/blkback.c:934:14: warning: Although the value
stored to 'i' is used in the enclosing expression, the value is never
actually read from 'i' [deadcode.DeadStores]

Signed-off-by: Colin Ian King 
---
 drivers/block/xen-blkback/blkback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/xen-blkback/blkback.c 
b/drivers/block/xen-blkback/blkback.c
index d1e26461a64e..de42458195bc 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -931,7 +931,7 @@ static int xen_blkbk_parse_indirect(struct blkif_request 
*req,
if (rc)
goto unmap;
 
-   for (n = 0, i = 0; n < nseg; n++) {
+   for (n = 0; n < nseg; n++) {
uint8_t first_sect, last_sect;
 
if ((n % SEGS_PER_INDIRECT_FRAME) == 0) {
-- 
2.35.1




Re: [Xen-devel] [PATCH][next] xen/gntdev: remove redundant non-zero check on ret

2019-11-11 Thread Colin Ian King
On 11/11/2019 13:17, Jürgen Groß wrote:
> On 11.11.19 13:31, Colin Ian King wrote:
>> On 11/11/2019 12:25, Jürgen Groß wrote:
>>> On 11.11.19 13:20, Colin King wrote:
>>>> From: Colin Ian King 
>>>>
>>>> The non-zero check on ret is always going to be false because
>>>> ret was initialized as zero and the only place it is set to
>>>> non-zero contains a return path before the non-zero check. Hence
>>>> the check is redundant and can be removed.
>>>
>>> Which version did you patch against? In current master the above
>>> statement is not true.
>>
>> against today's linux-next
> 
> Ah, okay, this is likely the result of the recent mm-notifier patch
> series. I'll put this patch on hold until the recent patches have
> hit master.

Cool, thanks!
> 
> 
> Juergen


___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH][next] xen/gntdev: remove redundant non-zero check on ret

2019-11-11 Thread Colin Ian King
On 11/11/2019 12:25, Jürgen Groß wrote:
> On 11.11.19 13:20, Colin King wrote:
>> From: Colin Ian King 
>>
>> The non-zero check on ret is always going to be false because
>> ret was initialized as zero and the only place it is set to
>> non-zero contains a return path before the non-zero check. Hence
>> the check is redundant and can be removed.
> 
> Which version did you patch against? In current master the above
> statement is not true.

against today's linux-next

Colin
> 
> 
> Juergen
> 
>>
>> Addresses-Coverity: ("Logically dead code")
>> Signed-off-by: Colin Ian King 
>> ---
>>   drivers/xen/gntdev.c | 5 -
>>   1 file changed, 5 deletions(-)
>>
>> diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
>> index 10cc5e9e612a..07d80b176118 100644
>> --- a/drivers/xen/gntdev.c
>> +++ b/drivers/xen/gntdev.c
>> @@ -524,11 +524,6 @@ static int gntdev_open(struct inode *inode,
>> struct file *flip)
>>   }
>>   #endif
>>   -    if (ret) {
>> -    kfree(priv);
>> -    return ret;
>> -    }
>> -
>>   flip->private_data = priv;
>>   #ifdef CONFIG_XEN_GRANT_DMA_ALLOC
>>   priv->dma_dev = gntdev_miscdev.this_device;
>>
> 


___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel