From patchwork Tue Feb 14 13:50:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 13140155 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2D6AC61DA4 for ; Tue, 14 Feb 2023 13:52:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229665AbjBNNwU (ORCPT ); Tue, 14 Feb 2023 08:52:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229617AbjBNNwU (ORCPT ); Tue, 14 Feb 2023 08:52:20 -0500 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::222]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98CB56A44; Tue, 14 Feb 2023 05:51:51 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 27D1F4001C; Tue, 14 Feb 2023 13:50:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1676382648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aFpeaht2YTkpF7k3aSsGfayRg82bAR8GM9wVS2OZdx8=; b=d3Xz7QpaF6c4mCDDZIVw9sxiRTPUohjbFrFSGuxayj92gHn21dKT1mTIHRBAeGzVavHje1 c1rNjUPqbXW0suouoVJSlCVcnKgt+6lobLdqjFObbyHCxwHTw//D5s6+ipdWEtmIoEjj2w rareXCu3tgpGpVQTBJaHpj8vXG9sVqUOSJ8i/0G29AA2gmXKkebwoapY0Zp5Z6EHYK35X7 GGcxWsJE+Uv+C0Ws3nd29Xk2kC156dPaIHbP3QfCpJrqQTxxt7MNTMbjtNuYY6wa0sxw/X 26pPAoVEMmhR0JpVIqDc7gwTF/c4LsxF4WkBIb6FDml85YlE9u2ufyBBgInVaw== From: Miquel Raynal To: Alexander Aring , Stefan Schmidt , linux-wpan@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet , netdev@vger.kernel.org, David Girault , Romuald Despres , Frederic Blain , Nicolas Schodet , Guilhem Imberton , Thomas Petazzoni , Miquel Raynal , kernel test robot Subject: [PATCH wpan v2 5/6] mac802154: Fix an always true condition Date: Tue, 14 Feb 2023 14:50:34 +0100 Message-Id: <20230214135035.1202471-6-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230214135035.1202471-1-miquel.raynal@bootlin.com> References: <20230214135035.1202471-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org At this stage we simply do not care about the delayed work value, because active scan is not yet supported, so we can blindly queue another work once a beacon has been sent. It fixes a smatch warning: mac802154_beacon_worker() warn: always true condition '(local->beacon_interval >= 0) => (0-u32max >= 0)' Fixes: 3accf4762734 ("mac802154: Handle basic beaconing") Reported-by: kernel test robot Signed-off-by: Miquel Raynal --- net/mac802154/scan.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/mac802154/scan.c b/net/mac802154/scan.c index fff41e59099e..9b0933a185eb 100644 --- a/net/mac802154/scan.c +++ b/net/mac802154/scan.c @@ -383,9 +383,8 @@ void mac802154_beacon_worker(struct work_struct *work) dev_err(&sdata->dev->dev, "Beacon could not be transmitted (%d)\n", ret); - if (local->beacon_interval >= 0) - queue_delayed_work(local->mac_wq, &local->beacon_work, - local->beacon_interval); + queue_delayed_work(local->mac_wq, &local->beacon_work, + local->beacon_interval); } int mac802154_stop_beacons_locked(struct ieee802154_local *local,