From: david@lechnology.com (David Lechner) Date: Tue, 25 Oct 2016 11:12:23 -0500 Subject: [PATCH/RFT v2 11/17] USB: OHCI: make ohci-da8xx a separate driver In-Reply-To: References: <20161024164634.4330-1-ahaslam@baylibre.com> <20161024164634.4330-12-ahaslam@baylibre.com> <403743d8-dff2-3389-105b-1082b674b0b8@lechnology.com> Message-ID: <21019d11-3b01-3e0e-60bc-c4873cf20237@lechnology.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 10/25/2016 02:39 AM, Axel Haslam wrote: > On Tue, Oct 25, 2016 at 2:38 AM, David Lechner 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".