Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp749560rdb; Sat, 6 Jan 2024 07:32:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IFHWyP+6IA2Q5uwXls6Cs1HoRW5SrhCNMP+nrnpIahjZ+D3fhQXkk3ye9uUvegaWgSB8cHn X-Received: by 2002:a81:49ce:0:b0:5e7:572c:c7a7 with SMTP id w197-20020a8149ce000000b005e7572cc7a7mr730160ywa.49.1704555136109; Sat, 06 Jan 2024 07:32:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704555136; cv=none; d=google.com; s=arc-20160816; b=CpgOrGOKERJqw7/FdP4HxOfa/Al+IWy3cV8PB7K5qxngwcrhjOl1VcHBaNDqOqzlc8 YUvg0yWJ4nIIp5+Nl88eYQA9FPC+yxyUOTVR/gqOv80/BhJooghhXXl6e7K1oB6UDWPD KZax29PzWpsmCRRdOk/wayPXVsSowAa0oHpMDWDEcliA8XEPs/iSl5hraAJwUyiGRyMW xVO6B+7M+EO3zbfpOCHaZ3Z0HbfhTewdHWct5aoidGunqxv3qB+ZyM2tt8LdY8x+xC/R K9T85asnFdp5tXldYencSFGEa4lrBu0zXSPnacDTXYdEnAM3zhuOWCZS92tzNrrsmjml nL8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=DF824uCnaiGc2FSUzvMoqf5PsqvATqJrmBhYo2JITb0=; fh=ldnk+P1WZsiA9zzMVLGtHhYSdVF7NoedpZZyqXRKT+A=; b=WzpTFLA2dZdl/T2DOrdAS4wxPdlX3eAfvsDsT/zt72uu7SYZiuQuWXFxupv5Xf/uzW 4tvwvHEb8TFXbP3s3j8sHxAjwHXYdBihBXjcA2wWM7fHpEPmAz4qPrmDkb7RnXhTuBX3 /QlyFiJPLLfVlACU8VT/jOOVtREsusKBenaRfz8zr3o8ZTlpukHYtB7L9hmWSzZ2hczt gtUZSn+WHDgTmC0TgWVZBreIYmNjTiWKiz0PCZXpGoG3bI3Bs9zP99n6loj8E3yg6pOT 07I4ciTjzX9oMs2MGRi6+E934uaRzD60HlvumvHsR58W95FjIGlpa9KNFJE8Ymw/Ahjx s0fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fcoAXPst; spf=pass (google.com: domain of linux-kernel+bounces-18625-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18625-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bp44-20020a05620a45ac00b00781b6a72d74si4233361qkb.592.2024.01.06.07.32.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 07:32:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18625-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fcoAXPst; spf=pass (google.com: domain of linux-kernel+bounces-18625-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18625-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D7DCB1C210A0 for ; Sat, 6 Jan 2024 15:32:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6172E8820; Sat, 6 Jan 2024 15:32:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fcoAXPst" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 257CFC2C7; Sat, 6 Jan 2024 15:32:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-40d5a41143fso5617075e9.3; Sat, 06 Jan 2024 07:32:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704555123; x=1705159923; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DF824uCnaiGc2FSUzvMoqf5PsqvATqJrmBhYo2JITb0=; b=fcoAXPst/fZh33zUWAKmKeqmhfEaKk7uHFUa2DeH9sqD/r3FMxUouIVbqxIYLziNm4 V9BGAL3vJBD5KpiYgSRo6IrwxQkAbep7EdTJk6+FX9VgyYdCyDP/ON6UMdYvluCKZftw wAWQwBXLoOW3R+t33TtAawvdJ43bUbaYWy3vn+tho9/iYwadpoi7cgLX7EaoJrxxGA5q 3tD9bxZd0FwYIvukWV6fVzh2QXyCOmII412vUl3c8d/vkyjD1WoPXe+zaiER/ySTuT01 Q1n60Nqyx/1uxbKIq1yW4mkYzOrqg/YfsQT/VeWV4gMvWup6FbThQGB7zvg5xm9g8C93 fzOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704555123; x=1705159923; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DF824uCnaiGc2FSUzvMoqf5PsqvATqJrmBhYo2JITb0=; b=hnlFxU0lV4sOhP3RtJPSoZjwYNAERf5E271Gb07OjKENK1aPt+cnGsJ2g3LtHPu3Uh mXFyIX7ziaGoiuRDHVygNdibhJskY4UzHqJn+4Vo9CfXzko4fBMQPu7AjRBg0MINT9rS pokw498WQcJQX0MJ/vpotW7haavLk4Cgee8Tgd9DVDll1XiRzdwU4CRMqkqiuwE0IBZs p0VozJlCdlyveIRRZa9kAaSs3SNcThuPJGc8kIZhPt4wtnfpYpwOyOZP+AzE+cDNoIAz +pxj1jfqNPolEa+MGemKWMYoLzGLQaTX3tgOhXK0hbxMgPe+0447MYce/ONOR7cSpJtD 37CQ== X-Gm-Message-State: AOJu0Yxvw94JL8I+AKXwPET7u42Gy0hH2j5HPGSJCwbKcq3vWQZZFEue Zw3R0nCsW/imZ5i5s5spx/uamQ3UT51xlA== X-Received: by 2002:a05:600c:6987:b0:40e:3caa:f308 with SMTP id fp7-20020a05600c698700b0040e3caaf308mr605650wmb.56.1704555123228; Sat, 06 Jan 2024 07:32:03 -0800 (PST) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id g8-20020a05600c310800b0040e42391a12sm690204wmo.13.2024.01.06.07.32.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 07:32:02 -0800 (PST) From: Colin Ian King To: Jonathan Cameron , Lars-Peter Clausen , Jean-Baptiste Maneyrol , Andy Shevchenko , linux-iio@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] iio: invensense: remove redundant initialization of variable period Date: Sat, 6 Jan 2024 15:32:02 +0000 Message-Id: <20240106153202.54861-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.39.2 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="utf-8" Content-Transfer-Encoding: 8bit The variable period is being initialized with a value that is never read, it is being re-assigned a new value later on before it is read. The initialization is redundant and can be removed. Cleans up clang scan build warning: Value stored to 'period' during its initialization is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King --- drivers/iio/common/inv_sensors/inv_sensors_timestamp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/common/inv_sensors/inv_sensors_timestamp.c b/drivers/iio/common/inv_sensors/inv_sensors_timestamp.c index 03823ee57f59..3b0f9598a7c7 100644 --- a/drivers/iio/common/inv_sensors/inv_sensors_timestamp.c +++ b/drivers/iio/common/inv_sensors/inv_sensors_timestamp.c @@ -126,7 +126,7 @@ void inv_sensors_timestamp_interrupt(struct inv_sensors_timestamp *ts, struct inv_sensors_timestamp_interval *it; int64_t delta, interval; const uint32_t fifo_mult = fifo_period / ts->chip.clock_period; - uint32_t period = ts->period; + uint32_t period; bool valid = false; if (fifo_nb == 0) -- 2.39.2