Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1593034imm; Fri, 14 Sep 2018 22:48:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZxrZU7WaaxXnvWf0ZifmvR37qgXz+17mWGK6OFt1e2a4qyN1XJNBTSRN15WbxnBGHO1CCK X-Received: by 2002:a17:902:a504:: with SMTP id s4-v6mr15629486plq.101.1536990519338; Fri, 14 Sep 2018 22:48:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536990519; cv=none; d=google.com; s=arc-20160816; b=gm2ru0hIv2+Ct11hPYuYCaHPi250HkVuaOIXrtZwafuKIJVH86v0U7s5JgGnQoObEU Ye2Kgs4ds1O/b/p/3AW1bU7vwcGOwSHiqtR01BFbKxzWVIo/6wcvkVmFCmLvMwqVMSfD q67q3ZgoNkIKC/imh+KE9U+RiwC9zVcI/qBfGLB3tCx0khK1Okp+Mt1ZXAQAwkbqOtrw +LIvEJjWsLTQaXWQYyV9BeHQZWvyYfv60dgHmOX7ffmha4M7P3FM7WF+X73aKDweBUgV OZUSiBanrrw6FosAbJKdvMUekzggBf6G5nvsechaoeAiKF5gyAymcffhaQVLgvrqLufJ WQgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=yb8M0w3sWCQ3bm/1psrk9hxQUPInvI5JzpjF9Fyqpf4=; b=YVveFU5+gn68SKxasDzVTOvHRfXuh0SnQLxgHxduuz4aZLHtMJ0D1XlPB2hplSL+GO u66hdp5yqGqfsgUb+HlvnCqTEbB7NLb5EKrmsXflwXFtUIiKhV/g6AuwZmlwI0pBM18a Isdni3JcMmdtPycEyhj+QfsIhgXD0VVCDD0uWMwycKOVLN+qhbuEjwv0NrxPbIuxKuWY On1ppprcNEX4MkrzKGYs1R2+RiwRzi4J2JyCBKw88Qbm5p6/6VQLe0K5Miiz6EMhc0OY zN9llJiYSHlVWovTASojSv4Yg6bY9yhGLYzNOnroje4zD9KH7c/B61hNkW7e0Che6ZPs RZow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iv4NLy4l; 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 o1-v6si8924626pld.223.2018.09.14.22.47.53; Fri, 14 Sep 2018 22:48:39 -0700 (PDT) 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=iv4NLy4l; 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 S1726996AbeIOLFc (ORCPT + 99 others); Sat, 15 Sep 2018 07:05:32 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:36052 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725976AbeIOLFc (ORCPT ); Sat, 15 Sep 2018 07:05:32 -0400 Received: by mail-wm1-f68.google.com with SMTP id j192-v6so3992626wmj.1; Fri, 14 Sep 2018 22:47:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=yb8M0w3sWCQ3bm/1psrk9hxQUPInvI5JzpjF9Fyqpf4=; b=iv4NLy4lmqxxQQlDjR7ibo+oWgRNRauXQEhnYMnolYnoEPL0A65iOzFGXZRbRPJ9Ja xdnPCd66hLtr+BDmzCRzNrDixdxa9l7J+yFriCqAIuyLAtfhLpbjusI7h4ucuP2utoco YyLJAh7LgGytLuAYHNgJmDuvgdwHvfBehSNZq1FAErCfV8OdXP3o6ChCemPZWh2g/afB h1Ddn3SgDtNnl241GSKBmuksRcEUJUDaYhnQvjZUQ5ZO0cIBJYdz91+vPRYkq5ij3sq8 /McHxYfkql654jnlKRgjGax0envyLw9j629I/Mbhi+1S7IEo6pmn+b/+VcBA7YmkDaQp biyg== 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=yb8M0w3sWCQ3bm/1psrk9hxQUPInvI5JzpjF9Fyqpf4=; b=YKW6hCcxwoWcRZfCSq3l9SpEmexylIPX0NGvP3mFf51YWfu/7Ln00b2htDNyRzh7yt ybVyZ9rNc0JwI858DWBSTWrE42mq/zaaLHd7LWWpNMgyGl1apWCkcaiOfxtQMW1ZFYB5 O4M5BFh6YU2Bq1RdRjFDUMQp73UlqmRYBqSYYYml0hAtt92ii233VgKVpggTW3KPCH+a TmE7M1mIsaJ1FJuM1QuEdeLjWxbqAFaaNRwpVTUbB6X3T/iJ2Gx06Go/iH77hZ72ofoH /fe2MdtgheqQecZjr36Nf7+yDryM2tcozyDItWi0ezLGdPdPFW2RD7h9LC7DlPnrsf72 hzsQ== X-Gm-Message-State: APzg51AZC9Szgx8dmgfa4DqPRiScefi3zdiFN6JFUpY6aNn/B4tZqRUb wOOXzCDInRsQpZdFoniZLdE= X-Received: by 2002:a1c:c44a:: with SMTP id u71-v6mr4856745wmf.43.1536990465672; Fri, 14 Sep 2018 22:47:45 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id i4-v6sm6593948wrs.85.2018.09.14.22.47.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Sep 2018 22:47:45 -0700 (PDT) From: Nathan Chancellor To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Nick Desaulniers , Nathan Chancellor Subject: [PATCH] [media] dib7000p: Remove dead code Date: Fri, 14 Sep 2018 22:47:39 -0700 Message-Id: <20180915054739.14117-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.18.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang warns that 'interleaving' is assigned to itself in this function. drivers/media/dvb-frontends/dib7000p.c:1874:15: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] interleaving = interleaving; ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~ 1 warning generated. It's correct. Just removing the self-assignment would sufficiently hide the warning but all of this code is dead because 'tmp' is zero due to being multiplied by zero. This doesn't appear to be an issue with dib8000, which this code was copied from in commit 041ad449683b ("[media] dib7000p: Add DVBv5 stats support"). Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- drivers/media/dvb-frontends/dib7000p.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/media/dvb-frontends/dib7000p.c b/drivers/media/dvb-frontends/dib7000p.c index 58387860b62d..25843658fc68 100644 --- a/drivers/media/dvb-frontends/dib7000p.c +++ b/drivers/media/dvb-frontends/dib7000p.c @@ -1800,9 +1800,8 @@ static u32 dib7000p_get_time_us(struct dvb_frontend *demod) { struct dtv_frontend_properties *c = &demod->dtv_property_cache; u64 time_us, tmp64; - u32 tmp, denom; - int guard, rate_num, rate_denum = 1, bits_per_symbol; - int interleaving = 0, fft_div; + u32 denom; + int guard, rate_num, rate_denum = 1, bits_per_symbol, fft_div; switch (c->guard_interval) { case GUARD_INTERVAL_1_4: @@ -1871,8 +1870,6 @@ static u32 dib7000p_get_time_us(struct dvb_frontend *demod) break; } - interleaving = interleaving; - denom = bits_per_symbol * rate_num * fft_div * 384; /* If calculus gets wrong, wait for 1s for the next stats */ @@ -1887,9 +1884,6 @@ static u32 dib7000p_get_time_us(struct dvb_frontend *demod) time_us += denom / 2; do_div(time_us, denom); - tmp = 1008 * 96 * interleaving; - time_us += tmp + tmp / guard; - return time_us; } -- 2.18.0