From: Ben Hutchings <bhutchings@solarflare.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-net-drivers@solarflare.com>
Subject: [PATCH net-next 03/32] sfc: Remove parentheses around return expressions, reported by checkpatch
Date: Fri, 27 Jan 2012 20:42:56 +0000 [thread overview]
Message-ID: <1327696976.2503.10.camel@bwh-desktop> (raw)
In-Reply-To: <1327696858.2503.7.camel@bwh-desktop>
Fix the following error:
ERROR: return is not a function, parentheses are not required
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
drivers/net/ethernet/sfc/rx.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c
index aca3498..3572c34 100644
--- a/drivers/net/ethernet/sfc/rx.c
+++ b/drivers/net/ethernet/sfc/rx.c
@@ -98,8 +98,8 @@ static inline unsigned int efx_rx_buf_offset(struct efx_nic *efx,
/* Offset is always within one page, so we don't need to consider
* the page order.
*/
- return (((__force unsigned long) buf->dma_addr & (PAGE_SIZE - 1)) +
- efx->type->rx_buffer_hash_size);
+ return ((__force unsigned long) buf->dma_addr & (PAGE_SIZE - 1)) +
+ efx->type->rx_buffer_hash_size;
}
static inline unsigned int efx_rx_buf_size(struct efx_nic *efx)
{
@@ -111,8 +111,7 @@ static u8 *efx_rx_buf_eh(struct efx_nic *efx, struct efx_rx_buffer *buf)
if (buf->is_page)
return page_address(buf->u.page) + efx_rx_buf_offset(efx, buf);
else
- return ((u8 *)buf->u.skb->data +
- efx->type->rx_buffer_hash_size);
+ return (u8 *)buf->u.skb->data + efx->type->rx_buffer_hash_size;
}
static inline u32 efx_rx_buf_hash(const u8 *eh)
@@ -122,10 +121,10 @@ static inline u32 efx_rx_buf_hash(const u8 *eh)
return __le32_to_cpup((const __le32 *)(eh - 4));
#else
const u8 *data = eh - 4;
- return ((u32)data[0] |
- (u32)data[1] << 8 |
- (u32)data[2] << 16 |
- (u32)data[3] << 24);
+ return (u32)data[0] |
+ (u32)data[1] << 8 |
+ (u32)data[2] << 16 |
+ (u32)data[3] << 24;
#endif
}
--
1.7.7.5
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2012-01-27 20:42 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-27 20:40 pull request: sfc-next 2012-01-27 Ben Hutchings
2012-01-27 20:42 ` [PATCH net-next 01/32] sfc: Fix some formatting errors reported by checkpatch Ben Hutchings
2012-01-27 20:42 ` [PATCH net-next 02/32] sfc: Avoid assignment in an if-statement, " Ben Hutchings
2012-01-27 20:42 ` Ben Hutchings [this message]
2012-01-27 21:01 ` [PATCH net-next 03/32] sfc: Remove parentheses around return expressions, " Joe Perches
2012-01-30 16:45 ` Ben Hutchings
2012-01-27 20:43 ` [PATCH net-next 04/32] sfc: Const-qualify static data as appropriate, partly prompted " Ben Hutchings
2012-01-27 20:43 ` [PATCH net-next 05/32] sfc: Remove unnecessary inclusion of <asm/io.h>, " Ben Hutchings
2012-01-27 20:43 ` [PATCH net-next 06/32] sfc: Update MCDI (firmware interface) definitions Ben Hutchings
2012-01-27 20:44 ` [PATCH net-next 07/32] sfc: Rename efx_wanted_channels() to efx_wanted_parallelism() Ben Hutchings
2012-01-27 20:44 ` [PATCH net-next 08/32] sfc: Set default parallelism to per-core by default Ben Hutchings
2012-01-27 20:44 ` [PATCH net-next 09/32] sfc: Remove fallback for invalid permanent MAC address Ben Hutchings
2012-01-27 20:45 ` [PATCH net-next 10/32] sfc: Make handling of MC reboot more reliable Ben Hutchings
2012-01-27 20:45 ` [PATCH net-next 11/32] sfc: Use new names for MC shared memory layout constants Ben Hutchings
2012-01-27 20:45 ` [PATCH net-next 12/32] sfc: Hold efx_nic::stats_lock while reading efx_nic::mac_stats Ben Hutchings
2012-01-27 20:45 ` [PATCH net-next 13/32] sfc: Merge efx_mac_operations into efx_nic_type Ben Hutchings
2012-01-27 20:46 ` [PATCH net-next 14/32] sfc: Merge efx_mcdi_mac_check_fault() and efx_mcdi_get_mac_faults() Ben Hutchings
2012-01-27 20:46 ` [PATCH net-next 15/32] sfc: Remove efx_nic_type::push_multicast_hash operation Ben Hutchings
2012-01-27 20:46 ` [PATCH net-next 16/32] sfc: Consistently test DEBUG macro, not EFX_ENABLE_DEBUG Ben Hutchings
2012-01-27 20:47 ` [PATCH net-next 17/32] sfc: Support extraction of CAPABILITIES from GET_BOARD_CFG response Ben Hutchings
2012-01-27 20:48 ` [PATCH net-next 18/32] sfc: Correct interrupt timer quantum for Siena (normal and turbo mode) Ben Hutchings
2012-01-27 20:48 ` [PATCH net-next 19/32] sfc: Remove dependence on NAPI polling in efx_test_eventq_irq() Ben Hutchings
2012-01-27 20:48 ` [PATCH net-next 20/32] Partly revert "sfc: Handle serious errors in exactly one interrupt handler" Ben Hutchings
2012-01-27 20:49 ` [PATCH net-next 21/32] sfc: Clean up test interrupt handling Ben Hutchings
2012-01-27 20:49 ` [PATCH net-next 22/32] sfc: Add hwmon driver for boards using SFC9000-family controllers Ben Hutchings
2012-01-27 20:50 ` [PATCH net-next 23/32] sfc: Update the description of SFC_MTD Ben Hutchings
2012-01-27 20:50 ` [PATCH net-next 24/32] sfc: Remove obsolete function efx_dev_name() Ben Hutchings
2012-01-27 20:50 ` [PATCH net-next 25/32] sfc: Remove remnants of on-load self-test Ben Hutchings
2012-01-27 20:51 ` [PATCH net-next 26/32] sfc: Use existing local variables instead of repeated indirect lookups Ben Hutchings
2012-01-27 20:51 ` [PATCH net-next 27/32] sfc: Minor formatting fixes Ben Hutchings
2012-01-27 20:51 ` [PATCH net-next 28/32] sfc: Remove redundant 'rc' variable, always set to 0 Ben Hutchings
2012-01-27 20:52 ` [PATCH net-next 29/32] sfc: Rename implementation of ndo_set_rx_mode Ben Hutchings
2012-01-27 20:53 ` [PATCH net-next 30/32] sfc: Make all MAC statistics consistently 64 bits wide Ben Hutchings
2012-01-27 20:54 ` [PATCH net-next 31/32] sfc: Move the end of the non-GRO RX path into its own function Ben Hutchings
2012-01-27 20:54 ` [PATCH net-next 32/32] sfc: Replace efx_rx_buffer::is_page and other booleans with a flags field Ben Hutchings
2012-01-29 21:18 ` pull request: sfc-next 2012-01-27 David Miller
2012-01-29 21:40 ` Ben Hutchings
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=1327696976.2503.10.camel@bwh-desktop \
--to=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=linux-net-drivers@solarflare.com \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).