Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3654784pxv; Mon, 5 Jul 2021 02:37:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUvCdLXCeR5iU4nwjdIIzO7XOro7IUyUVel1q6WaFcOBq0p/nnqOHcV6WF17tGgEAwd8Of X-Received: by 2002:a17:906:b298:: with SMTP id q24mr12261360ejz.69.1625477820573; Mon, 05 Jul 2021 02:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625477820; cv=none; d=google.com; s=arc-20160816; b=L7Cnw+FH37rj3mLzqxeeTWXSd/U5zTPzeJI6ZGVu7qhdcvfUAVBq1O1/M89FcK7HLM e/zx9dQWixH2IfSNJSAS5g1yALYqU3MgqngMViibDC95wRUT1wQ3Uhv30BiWjM/Sjm4q 7gKzilFAASaboXEt9Tnwp17nYLCaewt5VG9he47kkjzNTOlA29U0W/PrzLnKb1aAQoNG PrCy18x0PBqXwSLDZ1oOPeYDXclSEC6AoGQ/vkvPS2puvWv/r3yCIlFTijQf7B5AP7QU A96mRK6arkDHtYA17ncEdjc8T9iY4tua9bB/K9PWDMXuB3S77nCd3UU+Vh3/yf7BhB6K 0brA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=H9IGuBh6b1IkxD52yNjIOiq+zaVXCJnrdfg/ux/fL3U=; b=WrssfEjJ16uzmORfP+4v6XwiWBHJl0O1j/3+wQ/JqvNBx2u996peU7F9VcrU/rZCT4 pW7FrDYQFBDvnnnV6LMgbMOAJjnXafdBh0NhZN9qnmj/j5+emlK77AEwvWSfZFgl3MQP VYiAUv5nuw4Mos2bc+OWIPxTkAAKfUHLc/W+VsfvaBSJ5vu44ZcbwbqgQK1ozcU6El1b DF9Joe6DHW7+tYl23kdf35TmWBJkmKm0kPGY/qZLL2VdsadHcawFhD0Cfo4ZRsKSKoNO ffIe9oBIE53BY8P+LvF8k8wSrjBnfJY4PigP0JUdf281MzYEtqSMBCuZukyrHo7LFvkk Lr1A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b3si11413770edf.362.2021.07.05.02.36.37; Mon, 05 Jul 2021 02:37:00 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230367AbhGEJiQ (ORCPT + 99 others); Mon, 5 Jul 2021 05:38:16 -0400 Received: from inva020.nxp.com ([92.121.34.13]:46364 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230262AbhGEJiP (ORCPT ); Mon, 5 Jul 2021 05:38:15 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A90BC1A0476; Mon, 5 Jul 2021 11:35:37 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 707951A0465; Mon, 5 Jul 2021 11:35:37 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id BD96E183AC98; Mon, 5 Jul 2021 17:35:35 +0800 (+08) From: Yangbo Lu To: netdev@vger.kernel.org Cc: Yangbo Lu , linux-kernel@vger.kernel.org, Richard Cochran , "David S . Miller" , Rui Sousa , Sebastien Laveze Subject: [net] ptp: fix format string mismatch in ptp_sysfs.c Date: Mon, 5 Jul 2021 17:46:17 +0800 Message-Id: <20210705094617.15470-1-yangbo.lu@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix format string mismatch in ptp_sysfs.c. Use %u for unsigned int. Fixes: 73f37068d540 ("ptp: support ptp physical/virtual clocks conversion") Reported-by: kernel test robot Signed-off-by: Yangbo Lu --- drivers/ptp/ptp_sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ptp/ptp_sysfs.c b/drivers/ptp/ptp_sysfs.c index 6a36590ca77a..b3d96b747292 100644 --- a/drivers/ptp/ptp_sysfs.c +++ b/drivers/ptp/ptp_sysfs.c @@ -179,7 +179,7 @@ static ssize_t n_vclocks_show(struct device *dev, if (mutex_lock_interruptible(&ptp->n_vclocks_mux)) return -ERESTARTSYS; - size = snprintf(page, PAGE_SIZE - 1, "%d\n", ptp->n_vclocks); + size = snprintf(page, PAGE_SIZE - 1, "%u\n", ptp->n_vclocks); mutex_unlock(&ptp->n_vclocks_mux); @@ -252,7 +252,7 @@ static ssize_t max_vclocks_show(struct device *dev, struct ptp_clock *ptp = dev_get_drvdata(dev); ssize_t size; - size = snprintf(page, PAGE_SIZE - 1, "%d\n", ptp->max_vclocks); + size = snprintf(page, PAGE_SIZE - 1, "%u\n", ptp->max_vclocks); return size; } base-commit: 6ff63a150b5556012589ae59efac1b5eeb7d32c3 -- 2.25.1