Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH] staging: vme_user: Remove unnecessary parentheses
@ 2026-07-23 15:24 Faisal Mukhtar
  2026-07-28  7:18 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Faisal Mukhtar @ 2026-07-23 15:24 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel, Faisal Mukhtar

Fix style problems found by checkpatch.pl,
which are the unneeded parentheses inside if
statements in vme.c.

Signed-off-by: Faisal Mukhtar <mukhtarfaisal03@gmail.com>
---
 drivers/staging/vme_user/vme.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/vme_user/vme.c b/drivers/staging/vme_user/vme.c
index b5c66b66ce32..68b5c4613724 100644
--- a/drivers/staging/vme_user/vme.c
+++ b/drivers/staging/vme_user/vme.c
@@ -1210,9 +1210,9 @@ void vme_bus_error_handler(struct vme_bridge *bridge,
 	u32 aspace = vme_get_aspace(am);
 
 	list_for_each_entry(handler, &bridge->vme_error_handlers, list) {
-		if ((aspace == handler->aspace) &&
-		    (address >= handler->start) &&
-		    (address < handler->end)) {
+		if  (aspace == handler->aspace &&
+		     address >= handler->start &&
+		     address < handler->end) {
 			if (!handler->num_errors)
 				handler->first_error = address;
 			if (handler->num_errors != UINT_MAX)
@@ -1299,7 +1299,7 @@ int vme_irq_request(struct vme_dev *vdev, int level, int statid,
 		return -EINVAL;
 	}
 
-	if ((level < 1) || (level > 7)) {
+	if (level < 1 || level > 7) {
 		dev_err(bridge->parent, "Invalid interrupt level\n");
 		return -EINVAL;
 	}
@@ -1349,7 +1349,7 @@ void vme_irq_free(struct vme_dev *vdev, int level, int statid)
 		return;
 	}
 
-	if ((level < 1) || (level > 7)) {
+	if (level < 1 || level > 7) {
 		dev_err(bridge->parent, "Invalid interrupt level\n");
 		return;
 	}
@@ -1397,7 +1397,7 @@ int vme_irq_generate(struct vme_dev *vdev, int level, int statid)
 		return -EINVAL;
 	}
 
-	if ((level < 1) || (level > 7)) {
+	if (level < 1 || level > 7) {
 		dev_warn(bridge->parent, "Invalid interrupt level\n");
 		return -EINVAL;
 	}
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: vme_user: Remove unnecessary parentheses
  2026-07-23 15:24 [PATCH] staging: vme_user: Remove unnecessary parentheses Faisal Mukhtar
@ 2026-07-28  7:18 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2026-07-28  7:18 UTC (permalink / raw)
  To: Faisal Mukhtar; +Cc: linux-staging, linux-kernel

On Thu, Jul 23, 2026 at 08:24:17PM +0500, Faisal Mukhtar wrote:
> Fix style problems found by checkpatch.pl,
> which are the unneeded parentheses inside if
> statements in vme.c.
> 
> Signed-off-by: Faisal Mukhtar <mukhtarfaisal03@gmail.com>
> ---
>  drivers/staging/vme_user/vme.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/vme_user/vme.c b/drivers/staging/vme_user/vme.c
> index b5c66b66ce32..68b5c4613724 100644
> --- a/drivers/staging/vme_user/vme.c
> +++ b/drivers/staging/vme_user/vme.c
> @@ -1210,9 +1210,9 @@ void vme_bus_error_handler(struct vme_bridge *bridge,
>  	u32 aspace = vme_get_aspace(am);
>  
>  	list_for_each_entry(handler, &bridge->vme_error_handlers, list) {
> -		if ((aspace == handler->aspace) &&
> -		    (address >= handler->start) &&
> -		    (address < handler->end)) {
> +		if  (aspace == handler->aspace &&
> +		     address >= handler->start &&
> +		     address < handler->end) {

Please see the archives for why this patch just makes things harder to
understand.  checkpatch should have not warned you about this, always be
sure to use the latest version.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-28  7:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23 15:24 [PATCH] staging: vme_user: Remove unnecessary parentheses Faisal Mukhtar
2026-07-28  7:18 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox