From patchwork Sat Dec 14 23:01:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Hutchings X-Patchwork-Id: 301276 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 71D7F2C00AE for ; Sun, 15 Dec 2013 12:03:21 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753989Ab3LNXB1 (ORCPT ); Sat, 14 Dec 2013 18:01:27 -0500 Received: from webmail.solarflare.com ([12.187.104.25]:17268 "EHLO webmail.solarflare.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753858Ab3LNXB0 (ORCPT ); Sat, 14 Dec 2013 18:01:26 -0500 Received: from [192.168.4.224] (88.96.1.126) by webmail.SolarFlare.com (10.20.40.31) with Microsoft SMTP Server (TLS) id 14.3.158.1; Sat, 14 Dec 2013 15:01:22 -0800 Message-ID: <1387062082.12172.60.camel@deadeye.wl.decadent.org.uk> Subject: [PATCH net-next 02/15] sfc: Do not use MAC address as clock name From: Ben Hutchings To: David Miller CC: , , "Richard Cochran" Date: Sat, 14 Dec 2013 23:01:22 +0000 In-Reply-To: <1387061852.12172.58.camel@deadeye.wl.decadent.org.uk> References: <1387061852.12172.58.camel@deadeye.wl.decadent.org.uk> Organization: Solarflare Communications X-Mailer: Evolution 3.8.5-2+b1 MIME-Version: 1.0 X-Originating-IP: [88.96.1.126] X-TM-AS-Product-Ver: SMEX-10.0.0.1412-7.000.1014-20358.006 X-TM-AS-Result: No--5.122100-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org We'll be sharing clocks between multiple functions with their own MAC addresses. The name field is now documented as 'A short "friendly name" to identify the clock ...' and '... not meant to be a unique id.' So use the name 'sfc'. Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/ptp.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c index aa4876edaac6..5b434597ac63 100644 --- a/drivers/net/ethernet/sfc/ptp.c +++ b/drivers/net/ethernet/sfc/ptp.c @@ -965,9 +965,8 @@ int efx_ptp_probe(struct efx_nic *efx, struct efx_channel *channel) ptp->evt_overflow = false; ptp->phc_clock_info.owner = THIS_MODULE; - snprintf(ptp->phc_clock_info.name, - sizeof(ptp->phc_clock_info.name), - "%pm", efx->net_dev->perm_addr); + strlcpy(ptp->phc_clock_info.name, "sfc", + sizeof(ptp->phc_clock_info.name)); ptp->phc_clock_info.max_adj = MAX_PPB; ptp->phc_clock_info.n_alarm = 0; ptp->phc_clock_info.n_ext_ts = 0;