[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <06DFBC1E25D8024DB214DC7F41A3CD34488DD039@ORSMSX101.amr.corp.intel.com>
Date: Thu, 23 Aug 2012 16:09:30 +0000
From: "Vick, Matthew" <matthew.vick@...el.com>
To: Richard Cochran <richardcochran@...il.com>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"gospo@...hat.com" <gospo@...hat.com>,
"sassmann@...hat.com" <sassmann@...hat.com>
Subject: RE: [net-next 10/13] igb: Tidy up wrapping for CONFIG_IGB_PTP.
> -----Original Message-----
> From: Richard Cochran [mailto:richardcochran@...il.com]
> Sent: Thursday, August 23, 2012 4:04 AM
> To: Kirsher, Jeffrey T
> Cc: davem@...emloft.net; Vick, Matthew; netdev@...r.kernel.org;
> gospo@...hat.com; sassmann@...hat.com
> Subject: Re: [net-next 10/13] igb: Tidy up wrapping for CONFIG_IGB_PTP.
>
> On Thu, Aug 23, 2012 at 02:56:50AM -0700, Jeff Kirsher wrote:
> > From: Matthew Vick <matthew.vick@...el.com>
> >
> > For users without CONFIG_IGB_PTP=y, we should not be compiling any
> PTP
> > code into the driver. Tidy up the wrapping in igb to support this.
>
> Actually, you are doing more than that. You are adding a bunch of
> comments onto the already existing #endifs.
Fair enough. Would you like me to update the patch description?
> > +#ifdef CONFIG_IGB_PTP
> > struct ptp_clock *ptp_clock;
> > struct ptp_clock_info caps;
> > struct delayed_work overflow_work;
> > spinlock_t tmreg_lock;
> > struct cyclecounter cc;
> > struct timecounter tc;
> > +#endif /* CONFIG_IGB_PTP */
> > +
>
> This is legitimate, to reduce memory footprint.
>
> [...]
>
> But this is just churn. You aren't actually improving anything here. It
> is already clear that the #endif belongs to the #ifdef just three lines
> above.
>
> If you are on some kind of campaign to comment all the endifs, then you
> should say so, and, to be consistent, you should not overlook the
> CONFIG_IGB_DCA blocks.
>
> But I think it really isn't needed.
>
> Thanks,
> Richard
I'm willing to work on a follow on patch to add proper endings to CONFIG_IGB_DCA blocks. The reasoning here was "I'm working on the wrapping for the code here anyway, so I might as well make it consistent."
Personally, I think it is an improvement. If you want to add #endif comments, you may as well be consistent about it.
Cheers,
Matthew
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists