Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp368476imu; Fri, 7 Dec 2018 02:23:21 -0800 (PST) X-Google-Smtp-Source: AFSGD/XvQWDYOmARRn2A7dfhTRVQryiJ0+3sQGgpcbKRXNcZ3Cwvn9q7TmqeDO9U6XSu3bwTG3bP X-Received: by 2002:a17:902:b406:: with SMTP id x6mr1490738plr.329.1544178201500; Fri, 07 Dec 2018 02:23:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544178201; cv=none; d=google.com; s=arc-20160816; b=cRGIU0e9bjDzKduYbU8XndPfOf49gwiG3E6bo5xtUp/tI0ueIYcEOHuGPxmV/RIhUi 0WTfFFPGV3dehNzIspYOhNrUP8vAEb3bF0ZdG7I8pR5fCyPND0v33XtASaD6MSyCqtYO TvH0ZacvP9Rj2CUCBYC97vPocP3MTTtS9vuo66xaZ022TLgOFBv+dV/G6Uo+3aYfxcUb MaDybsGrfsYAHE10QGMPEMp6dkaRETVZ7FasvAr3P7iz9OF4mAi/Bx+qJlY6Fdtxh0lL uKFb8mvxpVYUqW56jpkgv+RcCD1/PkxRSjhAVGw+yo/QRrhSGFuM77cDuOWW11z+sy7V NMWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=aiu+6XztfPZTrAfY/hBXeeiKQGRSBMgrn4AYx0QFBW0=; b=zdsAxOmwRnUStETHHug6oCM9PF6AnBjUOPJ64N4UdJ9PLzgMsIU/tbQ11AQF/u4gtd 2SC/p9tZna2DcizWWjrTdu+xgMAlqYij0KGzI6opFvUGJ+rY674qq60fiynXKnsvLtPZ 4Ou3FumrweTm1fxGXxykaG46EZcCVmj0lTHqBQq6oU47KAYRqTELHFl5uAC9DTyF0ZH+ 8Qw+TTxGHbKCFAcF2jrgyx6h8R2WjLcAkQKJ1Q1qnPiEvkzmevC7R7ormja02VcBncGY TixQEUXbjOypmv9Z6CN62f6UBHn2ymtXHhRSPC8qfnLaZK5VS6VZ7QClXa4SNIQFIb9k IBIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b0vgPnLR; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si2362540pgy.35.2018.12.07.02.23.05; Fri, 07 Dec 2018 02:23:21 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b0vgPnLR; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726100AbeLGKV4 (ORCPT + 99 others); Fri, 7 Dec 2018 05:21:56 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:36976 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726008AbeLGKV4 (ORCPT ); Fri, 7 Dec 2018 05:21:56 -0500 Received: by mail-pg1-f196.google.com with SMTP id 80so1538936pge.4 for ; Fri, 07 Dec 2018 02:21:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aiu+6XztfPZTrAfY/hBXeeiKQGRSBMgrn4AYx0QFBW0=; b=b0vgPnLRp4i7Ph5Ddi/B8M70GWwzQUbwvHy2kTgdsre98Ip/kU2mhzbXjj1yFlw/iZ 1/iZZ8kagoUyofZvqRW5O/SjVTjLZlP11RcMneYiJtqwJB39Y8qRICe1yLqR6FGK0ATK hcuaS/YS6zUL1KxPS4mAmuwEHoeCnpCk83vxqm5XOxePrsMbPHh2PsR0RSj5qotxUqkz Fz7VifxDLcEHFckQfjz06WhN3tOn9CuIAIh5eMopRnUosfJ+bfgIb2j3JvUwEycHu+h1 aX9HhZPj1+EP7yATsa54RrIPaGvP5LUivRpdn1CxJPHkVZAnHHK0TmeOAGsGqimTR76E YaaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aiu+6XztfPZTrAfY/hBXeeiKQGRSBMgrn4AYx0QFBW0=; b=cZ1NS4ZtVxyccjLRQ/zb2q+s2+vHQC95mID6DEZW1f+1cKsnDo0/DBbQrnely8r7C4 UTORqYEXPcESjxjCTlGK7fRYykbwbOmUhJxYEIZAdBiGcxu75WV/cfnjgNfSsndPDLep DEFlsMgNp1N2W9bVJfNFyLYxeHzPGh5w4WYkB6jCkxGtXk4Q7nPmxO/rs7w1EAoRrbSw BldpZV0+Ttc14GcF1iSd+60l4yx0K/UHA66E3SbBVZD3cJf7yDYz1BcvxuMAdunIufpW 37gVR4NRutNF/fwy5cLfqAjB6UfRZ9ZB+Rlq9Lux2Z4yyY6TI/ms8yVfZ5t5/PZEB6Co hsfw== X-Gm-Message-State: AA+aEWaMiDznTn6UkVUNMFS6ZAzKaVOuFNnFyf5y642cH3+fHXaYk+eK zzYZ/LM8rpxRCTi3p+qE2lc= X-Received: by 2002:a63:83c1:: with SMTP id h184mr1380609pge.437.1544178115457; Fri, 07 Dec 2018 02:21:55 -0800 (PST) Received: from localhost.localdomain ([191.101.9.198]) by smtp.gmail.com with ESMTPSA id a9sm2936408pgq.20.2018.12.07.02.21.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 02:21:55 -0800 (PST) From: Bo YU To: gregkh@linuxfoundation.org, rafael@kernel.org Cc: Bo YU , linux-kernel@vger.kernel.org, joe@perches.com, yuzibode@126.com Subject: [PATCH v3 2/2] kobject: drop newline from msg string Date: Fri, 7 Dec 2018 05:21:49 -0500 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is currently a missing terminating newline in non-switch case match, when msg == NULL. Signed-off-by: Bo YU --- Changes in v3: Improve the commit log,requested by rafael. Changes in v2: According to Joe's suggestion,drop newline from msg lib/kobject_uevent.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index b7c088c902a2..1837765ebf01 100644 --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c @@ -195,12 +195,12 @@ int kobject_synth_uevent(struct kobject *kobj, const char *buf, size_t count) enum kobject_action action; const char *action_args; struct kobj_uevent_env *env; - const char *msg = NULL, *devpath; + const char *msg = NULL; int r; r = kobject_action_type(buf, count, &action, &action_args); if (r) { - msg = "unknown uevent action string\n"; + msg = "unknown uevent action string"; goto out; } @@ -212,7 +212,7 @@ int kobject_synth_uevent(struct kobject *kobj, const char *buf, size_t count) r = kobject_action_args(action_args, count - (action_args - buf), &env); if (r == -EINVAL) { - msg = "incorrect uevent action arguments\n"; + msg = "incorrect uevent action arguments"; goto out; } @@ -223,8 +223,9 @@ int kobject_synth_uevent(struct kobject *kobj, const char *buf, size_t count) kfree(env); out: if (r) { - devpath = kobject_get_path(kobj, GFP_KERNEL); - pr_warn("synth uevent: %s: %s", + char *devpath = kobject_get_path(kobj, GFP_KERNEL); + + pr_warn("synth uevent: %s: %s\n", devpath ?: "unknown device", msg ?: "failed to send uevent"); kfree(devpath); -- 2.11.0