From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51CA6347BDF for ; Wed, 19 Nov 2025 10:09:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763546968; cv=none; b=Gw5UZIXK7pzmgvpHOyancSUhP7aW5LrBiiUjYw72F6Wwm8czefnw8bMsnlfoZCYCa7xFHyIxLXdfCa/dT7QJr1nAwme7PmAK+2ddr5pze+oXRRUsAH5adO3caR/IHsld9buv+lpp8IV18Dko10hAidDkhxTrYkb6w93OPZVUJaA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763546968; c=relaxed/simple; bh=OJvuqh8SyRe//eizJsEe1K247PQ8bD47X5Q22nudA1U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ltg0GgXHs9fzUEgRMb/hYtR7qZEbnZljslpM3YiPsjimJqC//r3qIHj0sF93zoZgdPv8jPkUxcZawdiro7Bn3UMY1rFyw8z9PGubx0IBI0g+xTsvE4z9xLFDPAgr459ptBp7CDA72Dxtc0jaaU1q9Qt+pPwWtm2gCO74L1AE7+4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Me68I3F7; arc=none smtp.client-ip=209.85.218.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Me68I3F7" Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-b735ce67d1dso851789066b.3 for ; Wed, 19 Nov 2025 02:09:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1763546963; x=1764151763; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=mZmwnZeJsVmH4Emd6Sk7OTkRxBmCW6aXF7g1I/Zjods=; b=Me68I3F7En431raJbedjbBOoq/VSyrLNPSHh1NDSm7hS35yUH6C/wWOVtLpKfCtyKl pgezovtS+J6QjL9ajtb55htcb981QToFRQ+otMIJfwMjjV11g4S/+ihLcnAz/y8U6bMQ vvXmi1cN/61t0y6wCN8KE5mqZ1KQunNOGGjztAYvEIM9rtm2yLoN1BWHaoGQB0l04TCm cnIlJieWZmh52VixvgLDVLIKN7Oy65N1tNxRLoCQ5ndqdmyKOMCwQZUDSWQdLd5mGVUn Hr8IR746a3flbusR85EkV3KQPqkp5ZhtLalhLau2pCQSTiay13R7j/1/SFqpcCg/+jVE uPQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763546963; x=1764151763; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mZmwnZeJsVmH4Emd6Sk7OTkRxBmCW6aXF7g1I/Zjods=; b=gsdHK+couRjLOlzsQU/EEBEMSQ5k4sP7skhxMXL9k2S+0kOgrrjWKVH4Dd9ZX2Lx1n iuIBh5kBuHpymR31N2DRMA5f9J1QGY2AAR//X/HagJGQY6Oj/+9+tMYZgqdA6rAdpmVw bKZlKKgzB9yTKlcPbbyXOzuYbyqhPcbBmd6wHMCWI/NsrewaXdoETc/pVRkrD31JtRRb pVu1T3mnr7DoiQQrZJTQr/DpYVl4AF3f0BscoCH3n0yC+9baVwWO5YuTyOE2TF+u0/BP 6/n/Dc5LClfcO83gQ+6SX8p4tsm8gVBKw4j98cfe+Wu46VX1VcVXoitiRLzc+JnD4lAV T2QQ== X-Forwarded-Encrypted: i=1; AJvYcCWtvhtkTZCZzoWVHQUS9hj7RoDLyDmkc9vh+jH7A4nUXN08cFe4wzb1yiWhmc0ZqcQRn3l5BJ82bSuhyEk=@vger.kernel.org X-Gm-Message-State: AOJu0YyKgsAOqgaWYxl5YA0dok8DEuQG/QRZiT6fLhsjoaJ//Lbai26V Pp5GLEgl8xzwiWpITNCCtpyIb1Iqe7GcDY/Rnhn7lCaDLYrniADjRQyx4crD4ge2ATk= X-Gm-Gg: ASbGncuO6ZiHlwYq0yv3K0JbQUCO5QXPc353V+qNMxXv/6oyKh77rGOYQIvb/HhWY5I fDR3Xlg5fGVjBQczanOX9jtZovGZCuay3fxilLFohba04igFw2UsA5/w3tAMdtNk+ciuhW/pOcr 5UxL8oD8Zz6GlLuHFXHNiHIUc5gxTZA5GRAncXFWg7qsdnW62AXapvVkhxQivwYDY9xWZgGHRcd WYXnusgsgJbxzCW9vLl2fii1rfU5ey+RxfoV5XAZ8v20yWmVnRI0u7LLRCPLRPgIC66HFKNKD2/ jx9+V1EbEPwezO7NIl4B7jxKCUQZ2I17Kd4esz/zzq9X3bQFeLzVLk39p8tY4RUfZtz8oLrU4XW TRE5+7UTngSeYL90AA9yy8D7UqYnQBCH008AyLc3SxcThiXF4hwHN0VGG5w8x1yLSTdUW6BdSd2 kuRBwjT7J+fJZVCu0AwTedY2xC X-Google-Smtp-Source: AGHT+IHL60A5nBupA1OyvdeZdvK8rVJqcdAj2UJ8GMSSqilZDEkvpcYDaNSL65+yyn9lVOsemK499g== X-Received: by 2002:a17:907:1c81:b0:b72:d2df:641c with SMTP id a640c23a62f3a-b736795d498mr2006941666b.49.1763546963352; Wed, 19 Nov 2025 02:09:23 -0800 (PST) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b734fda8bc8sm1594056066b.49.2025.11.19.02.09.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Nov 2025 02:09:22 -0800 (PST) Date: Wed, 19 Nov 2025 11:08:01 +0100 From: Petr Mladek To: Andy Shevchenko Cc: Corey Minyard , Christian =?iso-8859-1?Q?K=F6nig?= , "Dr. David Alan Gilbert" , Alex Deucher , Thomas Zimmermann , Dmitry Baryshkov , Rob Clark , Matthew Brost , Ulf Hansson , Aleksandr Loktionov , Vitaly Lifshits , Manivannan Sadhasivam , Niklas Cassel , Calvin Owens , Vadim Fedorenko , Sagi Maimon , "Martin K. Petersen" , Karan Tilak Kumar , Hans Verkuil , Casey Schaufler , Steven Rostedt , Viacheslav Dubeyko , Max Kellermann , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, openipmi-developer@lists.sourceforge.net, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, amd-gfx@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-pci@vger.kernel.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, linux-staging@lists.linux.dev, ceph-devel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Rasmus Villemoes , Sergey Senozhatsky , Jonathan Corbet , Sumit Semwal , Gustavo Padovan , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , Marijn Suijten , Konrad Dybcio , Lucas De Marchi , Thomas =?iso-8859-1?Q?Hellstr=F6m?= , Rodrigo Vivi , Vladimir Oltean , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Tony Nguyen , Przemek Kitszel , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Kishon Vijay Abraham I , Bjorn Helgaas , Rodolfo Giometti , Jonathan Lemon , Richard Cochran , Stefan Haberland , Jan Hoeppner , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Satish Kharat , Sesidhar Baddela , "James E.J. Bottomley" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Xiubo Li , Ilya Dryomov , Masami Hiramatsu , Mathieu Desnoyers , Andrew Morton Subject: Re: [PATCH v3 19/21] scsi: fnic: Switch to use %ptSp Message-ID: References: <20251113150217.3030010-1-andriy.shevchenko@linux.intel.com> <20251113150217.3030010-20-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251113150217.3030010-20-andriy.shevchenko@linux.intel.com> On Thu 2025-11-13 15:32:33, Andy Shevchenko wrote: > Use %ptSp instead of open coded variants to print content of > struct timespec64 in human readable format. I was about to commit the changes into printk/linux.git and found a mistake during the final double check, see below. > diff --git a/drivers/scsi/fnic/fnic_trace.c b/drivers/scsi/fnic/fnic_trace.c > index cdc6b12b1ec2..0a849a195a8e 100644 > --- a/drivers/scsi/fnic/fnic_trace.c > +++ b/drivers/scsi/fnic/fnic_trace.c > @@ -215,30 +213,26 @@ int fnic_get_stats_data(struct stats_debug_info *debug, > { > int len = 0; > int buf_size = debug->buf_size; > - struct timespec64 val1, val2; > + struct timespec64 val, val1, val2; > int i = 0; > > - ktime_get_real_ts64(&val1); > + ktime_get_real_ts64(&val); > len = scnprintf(debug->debug_buffer + len, buf_size - len, > "------------------------------------------\n" > "\t\tTime\n" > "------------------------------------------\n"); > > + val1 = timespec64_sub(val, stats->stats_timestamps.last_reset_time); > + val2 = timespec64_sub(val, stats->stats_timestamps.last_read_time); > len += scnprintf(debug->debug_buffer + len, buf_size - len, > - "Current time : [%lld:%ld]\n" > - "Last stats reset time: [%lld:%09ld]\n" > - "Last stats read time: [%lld:%ld]\n" > - "delta since last reset: [%lld:%ld]\n" > - "delta since last read: [%lld:%ld]\n", > - (s64)val1.tv_sec, val1.tv_nsec, > - (s64)stats->stats_timestamps.last_reset_time.tv_sec, > - stats->stats_timestamps.last_reset_time.tv_nsec, > - (s64)stats->stats_timestamps.last_read_time.tv_sec, > - stats->stats_timestamps.last_read_time.tv_nsec, > - (s64)timespec64_sub(val1, stats->stats_timestamps.last_reset_time).tv_sec, > - timespec64_sub(val1, stats->stats_timestamps.last_reset_time).tv_nsec, > - (s64)timespec64_sub(val1, stats->stats_timestamps.last_read_time).tv_sec, > - timespec64_sub(val1, stats->stats_timestamps.last_read_time).tv_nsec); > + "Current time : [%ptSp]\n" > + "Last stats reset time: [%ptSp]\n" > + "Last stats read time: [%ptSp]\n" > + "delta since last reset: [%ptSp]\n" > + "delta since last read: [%ptSp]\n", Both delta times are printed at the end. > + &val, > + &stats->stats_timestamps.last_reset_time, &val1, > + &stats->stats_timestamps.last_read_time, &val2); I think that this should be: &stats->stats_timestamps.last_reset_time, &stats->stats_timestamps.last_read_time, &val1, &val2); > stats->stats_timestamps.last_read_time = val1; The original code stored the current time in "val1". This should be: stats->stats_timestamps.last_read_time = val; > @@ -416,8 +410,8 @@ int fnic_get_stats_data(struct stats_debug_info *debug, > jiffies_to_timespec64(stats->misc_stats.last_ack_time, &val2); Just for record. Another values are stored into @val1 and @val2 at this point. > len += scnprintf(debug->debug_buffer + len, buf_size - len, > - "Last ISR time: %llu (%8llu.%09lu)\n" > - "Last ACK time: %llu (%8llu.%09lu)\n" > + "Last ISR time: %llu (%ptSp)\n" > + "Last ACK time: %llu (%ptSp)\n" > "Max ISR jiffies: %llu\n" > "Max ISR time (ms) (0 denotes < 1 ms): %llu\n" > "Corr. work done: %llu\n" > @@ -437,10 +431,8 @@ int fnic_get_stats_data(struct stats_debug_info *debug, > "Number of rport not ready: %lld\n" > "Number of receive frame errors: %lld\n" > "Port speed (in Mbps): %lld\n", > - (u64)stats->misc_stats.last_isr_time, > - (s64)val1.tv_sec, val1.tv_nsec, > - (u64)stats->misc_stats.last_ack_time, > - (s64)val2.tv_sec, val2.tv_nsec, > + (u64)stats->misc_stats.last_isr_time, &val1, > + (u64)stats->misc_stats.last_ack_time, &val2, So, this is correct! > (u64)atomic64_read(&stats->misc_stats.max_isr_jiffies), > (u64)atomic64_read(&stats->misc_stats.max_isr_time_ms), > (u64)atomic64_read(&stats->misc_stats.corr_work_done), Now, I think that there is no need to resend the entire huge patchset. I could either fix this when comitting or commit the rest and you could send only this patch for review. Best Regards, Petr PS: All other patches look good. Well, nobody acked 7th patch yet. But I think that the change is pretty straightforward and we could do it even without an ack.