Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1550071lkv; Wed, 19 May 2021 12:32:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkW5udBX0sktqqsEpEq2KPmucOjwGoj+jqik3U9CzkIp3l8QoCnqn5EpD6+cfZpom7U10G X-Received: by 2002:a50:a446:: with SMTP id v6mr702416edb.254.1621452773622; Wed, 19 May 2021 12:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621452773; cv=none; d=google.com; s=arc-20160816; b=uk3trUUMUgM+Bfc0XVcjYEsSGci4FGX6yQLxEqCb0XZJYQH9aTk7bMAXQ08tSH5YNR p8rWl/Kca4oQJtOBxMF0k+lfAf1k/p0zmyeeJejCSHLc6Mc9O29S0ahSJ5Kyd+baVJoY iY+s1xUrpDte2PHzG4g9VZkdcLSFBTxLkeM9wh6aWtSLpmTSlFykY03OlOohZw1Pdkcp /uLSlmQmQ3ajhOC9koo27zZ8HVb2Nrowu/N80SqSBP7TwEnR337L9SI9WQZxcmpHQHqV KS5JUJP3J8gp/Ox9pOA37GcpVdlxeVbKVTocXz2DWblfTS6rJDWXA9VR2dGDMLZhT3ID zzcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qIj7fLXKJCW1ClsdVjQ8Ce0o2Jy0Cdsw+EFfSnMPZQY=; b=l0t2LtkJ3145DpwUn2E9nLlsaPnBoEjFIKhJw5PgYz1fASIxdeoUcgr0iI1LmMOltf k4Ak8Xy7D8J133P0bUEOhj4T3CxtfaVRyqwAdgQ/HUMV+vJXXxeM4Rrwi0gUZRSs8xwG 0BBMBbv3LFKnFAZN8JMKegO0+Dt0Cme0lBWmM4y0nsmo7ZNALTws4MdAavoQfPtiME+6 kmMVXFS56KosgflxI0yFSAP5mXsHkRODqpbxVlWrTW3WPWWOKiMRej5QF3suKbmqnaAK Qd4Byb28QTNlUt9DCo85UMl+5clCjFypQ6Ayabzz3shc6w7RZvfK9hG1GYI4IOgZWtWk trmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ex5r+6vn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp16si502338ejc.642.2021.05.19.12.32.29; Wed, 19 May 2021 12:32:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ex5r+6vn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349868AbhESLv3 (ORCPT + 99 others); Wed, 19 May 2021 07:51:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:34104 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbhESLv1 (ORCPT ); Wed, 19 May 2021 07:51:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 489F561004; Wed, 19 May 2021 11:50:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621425008; bh=IyFH+MsqCrUEp11ph7Ebo4LU9kmoq7dPm/W7a9IJJrY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ex5r+6vnzQswyzkWIQOOuU0coY0sHuhTwdvB8liV75Xf3Y4uVBNwCXbcu2TKJOk3v 65QFdjAd3ylMiP597Nbubbxqn074d4ZyhGXg6oRj97XbyciTmZRmQFhfZdKBmfVeLi u6OPqikXBlZ5bXnQaEy6O0Fu9F1Wlk1CMid+rgBVPJv2FNVmXE1Q+G8HzsQ597CuJE Ologg02G9671v1mJoIw2bTUEdCoT2hSkOd9JOgZqzXyuSxnfdLrBXBd1A/wftCZwy3 ptje/t5UCIesDwBxQaMB16JPYTAxF7HjoRaEi/njmU3PeYcy7zPDmZ9hCvvzdTi8Io Isg52/a3ThXhg== Date: Wed, 19 May 2021 14:50:04 +0300 From: Leon Romanovsky To: Heiner Kallweit Cc: Peter Geis , Andrew Lunn , Russell King , "David S . Miller" , Jakub Kicinski , Linux Kernel Mailing List , Linux Kernel Network Developers , "open list:ARM/Rockchip SoC..." Subject: Re: [PATCH] net: phy: add driver for Motorcomm yt8511 phy Message-ID: References: <20210511214605.2937099-1-pgwipeout@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 19, 2021 at 12:37:43PM +0200, Heiner Kallweit wrote: > On 19.05.2021 10:18, Leon Romanovsky wrote: > > On Tue, May 18, 2021 at 08:20:03PM -0400, Peter Geis wrote: > >> On Tue, May 18, 2021 at 4:59 AM Leon Romanovsky wrote: > >>> > >>> On Tue, May 11, 2021 at 05:46:06PM -0400, Peter Geis wrote: > >>>> Add a driver for the Motorcomm yt8511 phy that will be used in the > >>>> production Pine64 rk3566-quartz64 development board. > >>>> It supports gigabit transfer speeds, rgmii, and 125mhz clk output. > >>>> > >>>> Signed-off-by: Peter Geis > >>>> --- > >>>> MAINTAINERS | 6 +++ > >>>> drivers/net/phy/Kconfig | 6 +++ > >>>> drivers/net/phy/Makefile | 1 + > >>>> drivers/net/phy/motorcomm.c | 85 +++++++++++++++++++++++++++++++++++++ > >>>> 4 files changed, 98 insertions(+) > >>>> create mode 100644 drivers/net/phy/motorcomm.c > >>> > >>> <...> > >>> > >>>> +static const struct mdio_device_id __maybe_unused motorcomm_tbl[] = { > >>>> + { PHY_ID_MATCH_EXACT(PHY_ID_YT8511) }, > >>>> + { /* sentinal */ } > >>>> +} > >>> > >>> Why is this "__maybe_unused"? This *.c file doesn't have any compilation option > >>> to compile part of it. > >>> > >>> The "__maybe_unused" is not needed in this case. > >> > >> I was simply following convention, for example the realtek.c, > >> micrel.c, and smsc.c drivers all have this as well. > > > > Maybe they have a reason, but this specific driver doesn't have such. > > > > It's used like this: > MODULE_DEVICE_TABLE(mdio, ); > > And MODULE_DEVICE_TABLE is a no-op if MODULE isn't defined: > > #ifdef MODULE > /* Creates an alias so file2alias.c can find device table. */ > #define MODULE_DEVICE_TABLE(type, name) \ > extern typeof(name) __mod_##type##__##name##_device_table \ > __attribute__ ((unused, alias(__stringify(name)))) > #else /* !MODULE */ > #define MODULE_DEVICE_TABLE(type, name) > #endif > > In this case the table is unused. Do you see compilation warning for such scenario? Thanks > > > Thanks > > > >> > >>> > >>> Thanks > >