From: Tyler Taormina <taormina.dev@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev
Subject: [PATCH] staging: vme_user: Remove redundant parentheses
Date: Tue, 9 Jul 2024 12:15:26 -0700 [thread overview]
Message-ID: <Zo2MTjKCM_UaLIGx@localhost.localdomain> (raw)
Adhere to Linux kernel coding style.
Reported by checkpatch:
CHECK: Unnecessary parentheses around (...)
Signed-off-by: Tyler Taormina <taormina.dev@gmail.com>
---
drivers/staging/vme_user/vme.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/vme_user/vme.c b/drivers/staging/vme_user/vme.c
index 0cd370ab1008..5c1d1c9b7b70 100644
--- a/drivers/staging/vme_user/vme.c
+++ b/drivers/staging/vme_user/vme.c
@@ -274,7 +274,7 @@ struct vme_resource *vme_slave_request(struct vme_dev *vdev, u32 address,
mutex_lock(&slave_image->mtx);
if (((slave_image->address_attr & address) == address) &&
((slave_image->cycle_attr & cycle) == cycle) &&
- (slave_image->locked == 0)) {
+ slave_image->locked == 0) {
slave_image->locked = 1;
mutex_unlock(&slave_image->mtx);
allocated_image = slave_image;
@@ -473,7 +473,7 @@ struct vme_resource *vme_master_request(struct vme_dev *vdev, u32 address,
if (((master_image->address_attr & address) == address) &&
((master_image->cycle_attr & cycle) == cycle) &&
((master_image->width_attr & dwidth) == dwidth) &&
- (master_image->locked == 0)) {
+ master_image->locked == 0) {
master_image->locked = 1;
spin_unlock(&master_image->lock);
allocated_image = master_image;
@@ -849,7 +849,7 @@ struct vme_resource *vme_dma_request(struct vme_dev *vdev, u32 route)
/* Find an unlocked and compatible controller */
mutex_lock(&dma_ctrlr->mtx);
if (((dma_ctrlr->route_attr & route) == route) &&
- (dma_ctrlr->locked == 0)) {
+ dma_ctrlr->locked == 0) {
dma_ctrlr->locked = 1;
mutex_unlock(&dma_ctrlr->mtx);
allocated_ctrlr = dma_ctrlr;
@@ -1218,9 +1218,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)
@@ -1307,7 +1307,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;
}
@@ -1357,7 +1357,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;
}
@@ -1405,7 +1405,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.39.2
next reply other threads:[~2024-07-09 19:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-09 19:15 Tyler Taormina [this message]
2024-07-10 6:01 ` [PATCH] staging: vme_user: Remove redundant parentheses Nam Cao
2024-07-10 7:24 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zo2MTjKCM_UaLIGx@localhost.localdomain \
--to=taormina.dev@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.