Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3665910imu; Tue, 18 Dec 2018 02:04:09 -0800 (PST) X-Google-Smtp-Source: AFSGD/XBy2MEzRBll28GWGN6pMC6b/Bg5gMy4GGojOoimxLJeQgDBydYccgBBt3kWVzpERmQqNlV X-Received: by 2002:a17:902:201:: with SMTP id 1mr2950981plc.62.1545127449367; Tue, 18 Dec 2018 02:04:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545127449; cv=none; d=google.com; s=arc-20160816; b=QusDm8ThVCRSxVak6Jq8oouury06pZMQn8dxKmxXOLdBgzLTFN/ycVzoCfS/wOCOPe urZetLgvoW6FcZckTRMD1DKu3q8B5fo7J8i81rPcXpovKGVH3tiJ3JEhzsY71+8GhweK oqK6rUwD3KH4XgrvD3OzVUVIzL/RPUGJkG94ZSIBala1xEePtykld6+QXQWw2C7JxKM7 hXXSActycw8UuKzlHk4NYUCL/BZV+44H+l2brt9n2Stb4tHCqqTlWeT7mRHrRjpfzbBR B6dxipxJHQ46LJ5QWvoSqc6rNF0KPfvrsYxnmQB5zgnWEE54Kq01Pl3jLelABbD1X1Ls A9RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=bqevmLbteo5g5U49RWWK3RYiiV4mbOtPO56veSyO7ZE=; b=PH/xXhBW7bLbvqWMALLHQRMQOlyLX9mRAkZk/O1dyJOtjHscBMVIMge65kJV93rf2c JNgGn40tOpf458X3g8b08CX5E8k6kgiI16BMmlUhg7J2roUCsvr3YllRPjDZX6ojPyNy e8ua/7hpVeJuDczZE6REI2+9tekAODgkfWlXsT9LKG9ah7SH0DRjl5QONR3xOq0aEgRA ZqjABOGNdUI9pFCy7W1zGYFTAdMRhbSr+Sog2Da2/ATg1Mc6eG4Vk+o6uIYDjbP4RETk +C11hQad4X0csUUA5rUhzMwaafxqI5bLnAwVRPyYiobw320Tzigsdh5WVL1vzHefo4u4 Hy+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w16si13119761pga.328.2018.12.18.02.03.52; Tue, 18 Dec 2018 02:04:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726556AbeLRKBW (ORCPT + 99 others); Tue, 18 Dec 2018 05:01:22 -0500 Received: from mx2.suse.de ([195.135.220.15]:59392 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726379AbeLRKBW (ORCPT ); Tue, 18 Dec 2018 05:01:22 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9EBA6B088; Tue, 18 Dec 2018 10:01:20 +0000 (UTC) Date: Tue, 18 Dec 2018 11:01:19 +0100 From: Petr Mladek To: Sergey Senozhatsky Cc: Tetsuo Handa , Sergey Senozhatsky , Dmitry Vyukov , Steven Rostedt , Linus Torvalds , Andrew Morton , LKML , syzkaller Subject: Re: [PATCH] printk: Add caller information to printk() output. Message-ID: <20181218100119.3lf5ktzqbqkwsfb2@pathway.suse.cz> References: <20181204152724.ypk44mi4a56nrud4@pathway.suse.cz> <459018db-763b-9520-ead2-2c0d5975fbf3@i-love.sakura.ne.jp> <20181210130930.bas4fozjhe3dc5nu@pathway.suse.cz> <20181213121847.mwlr2vyv6qzclhk6@pathway.suse.cz> <20181213124255.GB3053@tigerII.localdomain> <20181217145452.3kev4rmo2l5lt2qy@pathway.suse.cz> <93f19e57-5051-c67d-9af4-b17624062d44@i-love.sakura.ne.jp> <20181218085524.GA1047@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181218085524.GA1047@jagdpanzerIV> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2018-12-18 17:55:24, Sergey Senozhatsky wrote: > On (12/18/18 06:05), Tetsuo Handa wrote: > > +#ifdef CONFIG_PRINTK_CALLER > > +static size_t print_caller(u32 id, char *buf) > > +{ > > + char from[12]; > > + > > + snprintf(from, sizeof(from), "%c%u", > > + id & 0x80000000 ? 'C' : 'T', id & ~0x80000000); > > + return sprintf(buf, "[%6s]", from); > > +} > > A nitpick: > > s/from/caller/g :) Great catch! > > > + Selecting this option causes "thread id" (if in task context) or > > + "processor id" (if not in task context) of the printk() messages > > + to be added. > > Would the following wording be a bit simpler? > > "Selecting this option causes printk() to add a caller "thread id" (if > in task context) or a caller "processor id" (if not in task context) > to every message." It sounds good to me. I have updated the patch in printk.git, for-4.22 branch. Best Regards, Petr PS: I think that I have rushed the patch probably too much. I did too much nitpicking in the past and am trying to find a better balance now.