Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3508998pxu; Mon, 30 Nov 2020 04:53:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCxDF6sV7VnrD+iYe0qJxxC7sstzNgRthrFnEPA4kmjUV9cSXP0l2wghoE1H3+944MQ+pT X-Received: by 2002:aa7:d443:: with SMTP id q3mr21377523edr.262.1606740834975; Mon, 30 Nov 2020 04:53:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606740834; cv=none; d=google.com; s=arc-20160816; b=twIa5F3wabfm1xIl9ALvbNodscsCB5ApJ7L0NOQWPwWz3RdCWwjWA046B57sickoDY urUK5mjXiuKxZzcGEQepVI7h/GG+5RSx+aZD5K9pHN4PGN+WPHqcyt66p4kxVvgLej6c x6XDyNua76fxhw59k6UhSaWylWpzOeFP6oQpmXtolvKYmfz62BDx094l0ltmUV8egOa/ Km/nMttCyGq2swppnSmTr3TSUFDc9g5MCsCBHVf5Bqq0fYyql1XNPypBLWbMqgCUl+Sb X0+ce0N6ZS+lwNh0Ui7qa0ALUI2Qloh11fsinc+GYtulWggn7HlcM59dPd3D2Votf9lc O1ZA== 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 :dkim-signature; bh=XgjnfGL7fhRwAvNQvTlzfgUXxKtKFm+93Zmvk2qerpQ=; b=RRoUU4RZJ7aKHXsQHmRkBnfwJKfOZLOqEsoRgj/0lVsTXlDgufAwj5l2GlcMMNhYa6 mzmMP8Pf42rFULHkypXblGzPY102j0IeUJqLPLk9fHP8+mJOAA8S4igy0BdPVKqYxfr/ F6KX5eHNRFipuDa0uJnHs5aC3qcvBswHN2cXHSRX2Jggt13DK1+Y/RpQCXDxAP3lh4ZO j5ZtODY29+RSAwdNcIS1Wu59igPUULMJi3DNAtiatC4tPJoLM3hJtB3/L09R8B9ijFTO M5lZKYMTJ7akC0BY9gjhpyPJuVKY6kWAL3SeY0zXUuYQWg9UjX+uL/GQwvQ30p52CMp5 8Ymg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O9JXaJ1j; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd19si2394117edb.502.2020.11.30.04.53.31; Mon, 30 Nov 2020 04:53:54 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=O9JXaJ1j; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726162AbgK3MuJ (ORCPT + 99 others); Mon, 30 Nov 2020 07:50:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbgK3MuJ (ORCPT ); Mon, 30 Nov 2020 07:50:09 -0500 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC06FC0613D2; Mon, 30 Nov 2020 04:49:28 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id 23so16053552wrc.8; Mon, 30 Nov 2020 04:49:28 -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; bh=XgjnfGL7fhRwAvNQvTlzfgUXxKtKFm+93Zmvk2qerpQ=; b=O9JXaJ1jDppA2obNDIfK25wfvYo3KGPkTt0LZTy6DcZU3ryV3Lxa4PbeyvrpFUpJk1 OOrlg575a6kEMInbh3kIDz0gyGve5ZTsGP/gnvZsbHGGxInfxyuWoBrLzqRyYgDu2IyI +OjRYRxZInnaIN8pIJQXsU0ExcGAgVuvjAwzrKbS7oWq63AdOXu7luK46KcucfSeG6uM rnFwzQ0EqtTBltqC9S8KrSSF1+LRFGti8J0ZDxaBMARp6XjlVjLg92etMPbOf+GpfnTW WaVMCapmssyLBTc7Cm+HYdBj3BGLBjeE/Fz3gG7BSCCrCanQceTIFE0bs0K9H8+ReGvn +qww== 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; bh=XgjnfGL7fhRwAvNQvTlzfgUXxKtKFm+93Zmvk2qerpQ=; b=C39Ccbbu3rFLGmT9rVfk3lPwZ8pjgtJE4JfrwoOlsBpp0YNvoM68F06/pn5kQGKdZB R3FckB2VDhlbIvrsXix/qAUqIrHLUiBCXjmhbv118C2AttBtCXaIUNIpSypJ6GCEV4bM sb7bIF7oP3hNZ2u0+LH6rP96H2Mjc17cz+XDMUbI0yW7sbBE73vN+OlIWg1+cB3gqqCm 7IWqXAiTksW2MRQ2ut8rtlkd1LsTRB4d5DgXV+L3qa4iLF3ZPbfcJSi/Aema21XFlEOV 5NDr6oaDsg6EyObh7M56tZ08acnbZyPeJD1oAap7wPPJrbzYVmXe3nas6zftKhveLzZ3 BC7A== X-Gm-Message-State: AOAM532fQQKOYuIdD3CjxqwC6mtC4fiKZ5AEU4eDASwQhu1ddQpWyN7J Utl2tmLHdtKNemK8X1FBfCo= X-Received: by 2002:a5d:4703:: with SMTP id y3mr27218012wrq.416.1606740567358; Mon, 30 Nov 2020 04:49:27 -0800 (PST) Received: from felia.fritz.box ([2001:16b8:2d4c:d300:8813:e95a:c6db:aa09]) by smtp.gmail.com with ESMTPSA id n4sm24474781wmc.30.2020.11.30.04.49.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2020 04:49:26 -0800 (PST) From: Lukas Bulwahn To: Petr Mladek , Sergey Senozhatsky , Steven Rostedt , John Ogness Cc: Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, kernel-janitors@vger.kernel.org, linux-safety@lists.elisa.tech, Lukas Bulwahn Subject: [PATCH] printk: remove obsolete dead assignment Date: Mon, 30 Nov 2020 13:49:15 +0100 Message-Id: <20201130124915.7573-1-lukas.bulwahn@gmail.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 849f3127bb46 ("switch /dev/kmsg to ->write_iter()") refactored devkmsg_write() and left over a dead assignment on the variable 'len'. Hence, make clang-analyzer warns: kernel/printk/printk.c:744:4: warning: Value stored to 'len' is never read [clang-analyzer-deadcode.DeadStores] len -= endp - line; ^ Simply remove this obsolete dead assignment here. Signed-off-by: Lukas Bulwahn --- applies cleanly on current master and next-20201130 Petr, please pick this minor non-urgent clean-up patch. kernel/printk/printk.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index f279d4fbd9dd..6e4e38b7cd91 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -741,7 +741,6 @@ static ssize_t devkmsg_write(struct kiocb *iocb, struct iov_iter *from) if (LOG_FACILITY(u) != 0) facility = LOG_FACILITY(u); endp++; - len -= endp - line; line = endp; } } -- 2.17.1