mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: David Miller <davem@davemloft.net>
Cc: <haicheng.li@linux.intel.com>, <netdev@vger.kernel.org>,
	<tshimizu818@gmail.com>, <linux-kernel@vger.kernel.org>,
	<haicheng.lee@gmail.com>
Subject: Re: [PATCH 1/2] Fix build error caused by broken PCH_PTP module dependency.
Date: Wed, 3 Oct 2012 22:45:10 +0100	[thread overview]
Message-ID: <1349300710.2763.8.camel@bwh-desktop.uk.solarflarecom.com> (raw)
In-Reply-To: <20121002.222238.1580734803370802133.davem@davemloft.net>

On Tue, 2012-10-02 at 22:22 -0400, David Miller wrote:
> From: Haicheng Li <haicheng.li@linux.intel.com>
> Date: Fri, 28 Sep 2012 14:57:38 +0800
> 
> > On 09/28/2012 02:46 PM, David Miller wrote:
> >> From: Haicheng Li<haicheng.li@linux.intel.com>
> >> Date: Fri, 28 Sep 2012 14:41:43 +0800
> >>
> >>> On 09/28/2012 06:09 AM, David Miller wrote:
> >>>> Look at how other people submit patches, do any other patch
> >>>> submissions
> >>>> look like your's having all of this metadata in the message body:
> >>> I'm sorry for it.
> >>>
> >>>> As for this specific patch:
> >>>>
> >>>>> -	depends on PTP_1588_CLOCK_PCH
> >>>>> +	depends on PTP_1588_CLOCK_PCH = PCH_GBE
> >>>>
> >>>> This is not the correct way to ensure that the module'ness of one
> >>>> config option meets the module'ness requirements of another.
> >>>> The correct way is to say something like "&&   (PCH_GBE || PCH_GBE=n)"
> >>>
> >>> This case is a little bit tricky than usual, with PCH_PTP selected,
> >>> the valid config would be either "PTP_1588_CLOCK_PCH=PCH_GBE=m" or
> >>> "PTP_1588_CLOCK_PCH=PCH_GBE=y", and PTP_1588_CLOCK_PCH depends on
> >>> PCH_GBE.
> >>
> >> And a simple "&&  PCH_GBE" should accomplish this, no?
> > No sir. it's actually same with the original Kconfig (by a if
> > PCH_GBE"), it just failed with this config:
> > 
> >         CONFIG_PCH_GBE=y
> >         CONFIG_PCH_PTP=y
> >         CONFIG_PTP_1588_CLOCK=m
> 
> The correct fix is to make the Kconfig entry for PCH_PTP use
> a "select PTP_1588_CLOCK" instead of "depends PTP_1588_CLOCK"
> 
> I'll apply this fix.
> 
> The is another, extremely convoluted, way to do this, which is
> what the SFC driver does which is:
> 
> depends on SFC && PTP_1588_CLOCK && !(SFC=y && PTP_1588_CLOCK=m)
> 
> but that looks horrible to me.

I thought of it as being a peripheral feature (which most Solarflare
hardware doesn't implement) so it made sense for SFC_PTP to be optional
like SFC_MTD and so on.  But I'm quite happy to use a select instead, if
you want that to be the convention for all drivers implementing PHC.

Ben.

-- 
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.


  reply	other threads:[~2012-10-03 21:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24  7:20 Haicheng Li
2012-09-24  7:22 ` [PATCH 2/2] Fix wrong description in PTP_1588_CLOCK_PCH help info Haicheng Li
2012-09-24  8:14   ` [Updated PATCH 2/2] Fix a typo in PTP_1588_CLOCK_PCH Kconfig " Haicheng Li
2012-09-25  0:24   ` [PATCH " Haicheng Li
2012-09-27 22:06     ` David Miller
2012-09-28  6:44       ` Haicheng Li
2012-09-24  8:08 ` [Updated PATCH 1/2] Fix build error caused by broken PCH_PTP module dependency Haicheng Li
2012-09-24 17:46 ` [PATCH " David Miller
2012-09-25  0:23 ` Haicheng Li
2012-09-27 22:09   ` David Miller
2012-09-28  6:41     ` Haicheng Li
2012-09-28  6:46       ` David Miller
2012-09-28  6:57         ` Haicheng Li
2012-10-03  2:22           ` David Miller
2012-10-03 21:45             ` Ben Hutchings [this message]
2012-10-04  0:43               ` David Miller
2012-10-16 20:09                 ` Ben Hutchings
2012-10-16 20:17                   ` David Miller
2012-10-16 21:08                     ` Keller, Jacob E

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=1349300710.2763.8.camel@bwh-desktop.uk.solarflarecom.com \
    --to=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=haicheng.lee@gmail.com \
    --cc=haicheng.li@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tshimizu818@gmail.com \
    /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

all inboxes | Powered by JetHome®