Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3704799pxj; Mon, 21 Jun 2021 04:52:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUx+uLW4k8nabo4n8ymGKMMCrGZUAvqo5jQa19DK9A9bUXVG8wDGiwbpZUw3qCrHOWphz2 X-Received: by 2002:a02:ccd0:: with SMTP id k16mr17341380jaq.56.1624276362822; Mon, 21 Jun 2021 04:52:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624276362; cv=none; d=google.com; s=arc-20160816; b=FEXc+zscVo9tgfE7KdX5bbmrDsWPs+6X9Y68xseOQbU4vUPNKX1GN6qg/GBCogc1du NsqdIphKF3SRx/H8rkrh/7sPx7KwpEUaRiU13LSD/RMraQWlZsuyOcffI4lSSpczPGWe FDfxCCuByI5iqwjQZPSxcJXLBjoySC1V/kcfu/2rjQBG6A6J1kiXHsdCJ6vBVizqC9w9 KAmZrMki8/NH08HuAS9nquE+vDa+70DfnwhKCa0Wf5bjrL8D2pyUpykI2+n4sLI1ZHS9 TjFbsutOzn/Os4oP1zqZCr/7Hpqm1IA+dCP6Z+KZWPo1h5arnleb3SWwnYrHcu+zyMtS 16tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=9KrUT04ET7j9PxJUik4TN78ZN7Dz6iXoztaQ6uI00AE=; b=kZJA1gwjKo34K49XFuxG258dgMAY1QTro9AoieYKMzLwBu2zSCJx82r7fMrmyuhv54 ncXJoyOqnPHe4tAc3q6sJq1htpMOTwEKsiu/ZpjWLnkvkUtmEQ3c8O6yCcATTy1zgEh2 F9ambUGssPU38Lzoz79i4TkfbLV1dLtiw64GhkaCM2/Q7DYJlPrDGvP0BVF3oS5cWD3H 4pypkkffaORg2kG7nUjWmw9XNZ6J2g3rIUeMiCv0VIgaSItN4GxsjweiObsgacG2Q5Xl My2T9KMyjUDTK5ngw8N8snLza/dM5n2r21DRGcYCd0Brdy1Vv+ofoRKCiQscgyVVz6Ws I3WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WZ14MuBf; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l16si19403713ion.65.2021.06.21.04.52.30; Mon, 21 Jun 2021 04:52:42 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WZ14MuBf; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229640AbhFULxG (ORCPT + 99 others); Mon, 21 Jun 2021 07:53:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30382 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbhFULxF (ORCPT ); Mon, 21 Jun 2021 07:53:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624276251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9KrUT04ET7j9PxJUik4TN78ZN7Dz6iXoztaQ6uI00AE=; b=WZ14MuBfGzxosqcVhgTXAvvP3XWrSKX8Gz47B485soWYLXla2MY1zNAb2oryD1XlDq1KJ6 1XPmkGPQukVTP4d6QwGG4mSQUus9+7Bvr0HWAp2aaeX79xSABV1b/W9xJmfxlKMAfdHlGo YLzVmlkpHE3yPW0UHWNkDY9yJad0yTk= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-460--HrMB2i6Nrm-ddlWil24Fg-1; Mon, 21 Jun 2021 07:50:50 -0400 X-MC-Unique: -HrMB2i6Nrm-ddlWil24Fg-1 Received: by mail-ej1-f71.google.com with SMTP id j26-20020a170906411ab02904774cb499f8so3861738ejk.6 for ; Mon, 21 Jun 2021 04:50:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9KrUT04ET7j9PxJUik4TN78ZN7Dz6iXoztaQ6uI00AE=; b=SQGyfWD9Odd1vW+qQsqWkc5bWfMEE/IplFto3yq9/ek7FzuS+Nj71WF3kiR6As4dK+ 2jOmVmNHt0oqW6RAqUcnlHrbl4C61SaGToJZC9sCmaoN+NC+dy7x4SYubuVuxT9eIrTU jAiadERNFiahju7QTbVyaXOiuBDoFLdT8O1WT7O7s7PeI4jDTdSoZEgbPMn46X+PI//s ZtBIx3FRlJGxJhGfSKqqxMOYL2V445RngkN+Z4sIUsiRR1p1gRxsNyOguKn3plZCYcQ9 KKYFgTPTqyH6jVS4luR19zjjgvOGsTt1AJ500vzFOrXDqzoRwJELpyQTG4MoJJ0JiYs5 4ppw== X-Gm-Message-State: AOAM530xQUeNOGaGuQ56c7oI06q7f7opSLUEoAcR989oh5/z+HoBMYL5 Abu9qIQg2ywttZC+U0qym+QX2YquSrPT+TH/MQsdbHxEFNsFHzTsVcFQd5CHMOuRtBaTrMCQNkU W72tranw57HmZIMbiWnKE19UCLBJ7/Yu3eAMHNrAM5FjS1azUxvv8cdyVS5ZNQ1OcJASnF5WNDU c= X-Received: by 2002:aa7:dccb:: with SMTP id w11mr20386560edu.96.1624276248930; Mon, 21 Jun 2021 04:50:48 -0700 (PDT) X-Received: by 2002:aa7:dccb:: with SMTP id w11mr20386518edu.96.1624276248722; Mon, 21 Jun 2021 04:50:48 -0700 (PDT) Received: from x1.bristot.me (host-79-23-205-114.retail.telecomitalia.it. [79.23.205.114]) by smtp.gmail.com with ESMTPSA id r17sm10360218edt.33.2021.06.21.04.50.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Jun 2021 04:50:48 -0700 (PDT) Subject: Re: [PATCH V4 06/12] trace: Add a generic function to read/write u64 values from tracefs To: Steven Rostedt Cc: Phil Auld , Sebastian Andrzej Siewior , Kate Carcia , Jonathan Corbet , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Alexandre Chartre , Clark Willaims , John Kacur , Juri Lelli , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <681a2fb508b3dad2979ac705c3df633f14abb9b2.1623746916.git.bristot@redhat.com> <20210618125651.7de04840@oasis.local.home> From: Daniel Bristot de Oliveira Message-ID: <1a8ccc87-6f04-7918-65ad-76c0cf13af07@redhat.com> Date: Mon, 21 Jun 2021 13:50:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210618125651.7de04840@oasis.local.home> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/18/21 6:56 PM, Steven Rostedt wrote: >> + return simple_read_from_buffer(ubuf, cnt, ppos, buf, len); > Egad, this entire patch is filled with whitespace issues! > > Please check your other patches too. daniel daniel daniel.... after all these years... Sorry... it was only in this patch. >> +} >> + > >> + >> +#define ULL_STR_SIZE 22 /* 20 digits max */ > Nit. I'd make this 24, just to be integer aligned. I mean, it's used as: > > > trace_min_max_read(struct file *filp, char __user *ubuf, size_t cnt, > loff_t *ppos) > { > struct trace_min_max_param *param = filp->private_data; > char buf[ULL_STR_SIZE]; > u64 val; > int len; > > Probably should reverse the above as well, that way if you do have > ULL_STR_SIZE as 24, then the int len, will fit right in before the u64 > val. Although, I think compilers are free to optimize that too :-/ I will do that! -- Daniel > -- Steve >