linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ahaslam@baylibre.com (Axel Haslam)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH/RFT v2 11/17] USB: OHCI: make ohci-da8xx a separate driver
Date: Tue, 25 Oct 2016 18:21:42 +0200	[thread overview]
Message-ID: <CAKXjFTM8RwsAut8cD0n0foxueSjR4VB4k4WJizXo9SyaW3viOA@mail.gmail.com> (raw)
In-Reply-To: <21019d11-3b01-3e0e-60bc-c4873cf20237@lechnology.com>

On Tue, Oct 25, 2016 at 6:12 PM, David Lechner <david@lechnology.com> wrote:
> On 10/25/2016 02:39 AM, Axel Haslam wrote:
>>
>> On Tue, Oct 25, 2016 at 2:38 AM, David Lechner <david@lechnology.com>
>> wrote:
>>>
>>> On 10/24/2016 11:46 AM, ahaslam at baylibre.com wrote:
>>>>
>>>>
>>>> -#ifndef CONFIG_ARCH_DAVINCI_DA8XX
>>>> -#error "This file is DA8xx bus glue.  Define
>>>> CONFIG_ARCH_DAVINCI_DA8XX."
>>>> -#endif
>>>> +#include "ohci.h"
>>>> +
>>>> +#define DRIVER_DESC "OHCI DA8XX driver"
>>>> +
>>>> +static const char hcd_name[] = "ohci-da8xx";
>>>
>>>
>>>
>>> why static const char instead of #define? This is only used one time in a
>>> pr_info, so it seems kind of pointless anyway.
>>
>>
>> Other drivers are using static const for the same variable.
>> i think static const is preferred over #define because #define doet give a
>> type.
>> If you dont mind ill keep it static const.
>>
>
> If this string was used in this file more than one place, I would agree with
> you, but currently it is only used as the argument of a pr_info(). The
> string "ohci-da8xx" could just be included in the fmt string instead of
> using "%s".

I think the purpose was to use it in the .name of the platform_driver
structure, too. only that not everybody is doing that, i looked at some bad
 examples :(

would you agree to keep it if we use it in .name too?

-Axel

>

  reply	other threads:[~2016-10-25 16:21 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24 16:46 [PATCH/RFT v2 00/17] Add DT support for ohci-da8xx ahaslam at baylibre.com
2016-10-24 16:46 ` [PATCH/RFT v2 01/17] ARM: davinci: da8xx: add usb phy clocks ahaslam at baylibre.com
2016-10-24 16:46 ` [PATCH/RFT v2 02/17] ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration ahaslam at baylibre.com
2016-10-25  8:10   ` Sekhar Nori
2016-10-25  9:37     ` Axel Haslam
2016-10-25 10:17       ` Sekhar Nori
2016-10-25 15:53         ` David Lechner
2016-10-26  8:56           ` Sekhar Nori
2016-10-24 16:46 ` [PATCH/RFT v2 03/17] ARM: davinci: da8xx: Add USB PHY " ahaslam at baylibre.com
2016-10-25  9:18   ` Sekhar Nori
2016-10-25  9:37     ` Axel Haslam
2016-10-24 16:46 ` [PATCH/RFT v2 04/17] ARM: DTS: da850: Add cfgchip syscon node ahaslam at baylibre.com
2016-10-24 16:46 ` [PATCH/RFT v2 05/17] ARM: DTS: da850: Add usb phy node ahaslam at baylibre.com
2016-10-24 16:46 ` [PATCH/RFT v2 06/17] ARM: davinci: da8xx: Fix some redefined symbol warnings ahaslam at baylibre.com
2016-10-25 10:03   ` Sekhar Nori
2016-10-25 12:14     ` Alexandre Bailon
2016-10-24 16:46 ` [PATCH/RFT v2 07/17] ARM: davinci: da8xx: Enable the usb20 "per" clk on phy_clk_enable ahaslam at baylibre.com
2016-10-25  2:53   ` David Lechner
2016-10-25 10:01     ` Axel Haslam
2016-10-25 10:12   ` Sekhar Nori
2016-10-25 16:05     ` David Lechner
2016-10-26  9:30       ` Sekhar Nori
2016-10-24 16:46 ` [PATCH/RFT v2 08/17] ARM: davinci: hawk: add full constraints for ohci plat boot ahaslam at baylibre.com
2016-10-25 10:28   ` Sekhar Nori
2016-10-25 10:31     ` Axel Haslam
2016-10-24 16:46 ` [PATCH/RFT v2 09/17] regulator: fixed: Add over current event ahaslam at baylibre.com
2016-10-24 17:43   ` Mark Brown
2016-10-24 17:53     ` Axel Haslam
2016-10-24 17:53   ` Mark Brown
2016-10-24 18:11     ` Axel Haslam
2016-10-24 18:19       ` Mark Brown
2016-10-25 12:55         ` Axel Haslam
2016-10-25 14:33           ` Mark Brown
2016-10-25 14:57             ` Axel Haslam
2016-10-25 15:07               ` Axel Haslam
2016-10-30 20:42   ` Rob Herring
2016-10-24 16:46 ` [PATCH/RFT v2 10/17] USB: da8xx: use flag instead of bitmask for over current change ahaslam at baylibre.com
2016-10-24 16:46 ` [PATCH/RFT v2 11/17] USB: OHCI: make ohci-da8xx a separate driver ahaslam at baylibre.com
2016-10-25  0:38   ` David Lechner
2016-10-25  7:39     ` Axel Haslam
2016-10-25 16:12       ` David Lechner
2016-10-25 16:21         ` Axel Haslam [this message]
2016-10-25 16:24           ` David Lechner
2016-10-24 16:46 ` [PATCH/RFT v2 12/17] USB: ochi-da8xx: Use a regulator for vbus/overcurrent ahaslam at baylibre.com
2016-10-25  1:39   ` David Lechner
2016-10-25  8:24     ` Axel Haslam
2016-10-25 16:53       ` David Lechner
2016-10-25 17:32         ` Axel Haslam
2016-10-25 10:43   ` Sekhar Nori
2016-10-25 10:52     ` Axel Haslam
2016-10-24 16:46 ` [PATCH/RFT v2 13/17] USB: da8xx: use ohci priv data instead of globals ahaslam at baylibre.com
2016-10-25  1:12   ` David Lechner
2016-10-25  9:56     ` Axel Haslam
2016-10-24 16:46 ` [PATCH/RFT v2 14/17] ARM: davinci: register the usb20_phy clock on the DT file ahaslam at baylibre.com
2016-10-24 16:46 ` [PATCH/RFT v2 15/17] usb: host: ohci-da8xx: Add devicetree bindings documentation ahaslam at baylibre.com
2016-10-25  1:02   ` David Lechner
2016-10-25  9:56     ` Axel Haslam
2016-10-24 16:46 ` [PATCH/RFT v2 16/17] USB: ohci-da8xx: Allow probing from DT ahaslam at baylibre.com
2016-10-25  0:53   ` David Lechner
2016-10-25  8:10     ` Axel Haslam
2016-10-24 16:46 ` [PATCH/RFT v2 17/17] ARM: dts: da850: add usb device node ahaslam at baylibre.com
2016-10-25  0:48   ` David Lechner
2016-10-25  8:03     ` Axel Haslam
2016-10-25 10:55 ` [PATCH/RFT v2 00/17] Add DT support for ohci-da8xx Sekhar Nori

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=CAKXjFTM8RwsAut8cD0n0foxueSjR4VB4k4WJizXo9SyaW3viOA@mail.gmail.com \
    --to=ahaslam@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.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).