Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1630153

Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C

From Benjamin Herrenschmidt <benh@kernel.crashing.org>
Newsgroups linux.kernel
Subject Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C
Date 2017-04-25 04:30 +0200
Message-ID <tzYoN-6YB-1@gated-at.bofh.it> (permalink)
References <tzQUi-21B-7@gated-at.bofh.it> <tzQUi-21B-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 2017-04-24 at 11:18 -0700, Brendan Higgins wrote:
> +static int __aspeed_i2c_init_clk(struct aspeed_i2c_bus *bus,
> +                                struct platform_device *pdev)
> +{

Minor nit ... I'm really not fan of those underscores.

We use __ functions in some cases in the kernel for low level
helpers, usually when it's a low level variant of an existing
function or an "unlocked" variant, but I don't think generalizing
it to pretty much everything in the driver is worthwhile here.

If you want to be explicit about locking, I would suggest you
use a comment in front of the function explaining if it
expects to be called with the lock held.

We tend to only do that when *both* functions exist and one is
implemented in term of the other.

Cheers,
Ben.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C Brendan Higgins <brendanhiggins@google.com> - 2017-04-24 20:30 +0200
  Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2017-04-25 04:30 +0200
    Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C Brendan Higgins <brendanhiggins@google.com> - 2017-04-25 10:10 +0200
  Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C Brendan Higgins <brendanhiggins@google.com> - 2017-05-09 01:40 +0200
  Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C Wolfram Sang <wsa@the-dreams.de> - 2017-05-09 04:30 +0200
  Re: [PATCH v7 4/5] i2c: aspeed: added driver for Aspeed I2C Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2017-05-09 09:20 +0200

csiph-web