Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp1337255rwl; Fri, 4 Nov 2022 12:41:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7ggCUf1GfzzXw47Y5dgqX8kJXIQtKMG50aziA4YT4liuRshVuKPcmff2gCZYk/0p/8dnSY X-Received: by 2002:a17:906:974f:b0:7aa:f705:e580 with SMTP id o15-20020a170906974f00b007aaf705e580mr34432621ejy.530.1667590870733; Fri, 04 Nov 2022 12:41:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667590870; cv=none; d=google.com; s=arc-20160816; b=K3nLwA3QRGW0bXxAPQD/qA2eF4IMOU0RMVb7yOwbb0ha2zDyAfSZp6RPmL7wbL5oxI KgdpmYNu+G5+aYc6rbfQg15fEZFSiRAYJo8EZJq023Kz6elgQUFfobTyK9qHND3KtS0I low+oemj7/OtTua2rj9U7uRiXMToMplI0pDKtR+iPOTr4H4FT6usKeFhxu5bfkSplLj/ 4PDPD45myH4eEiLNW1VbRwDsKJf8iggCXkKDIQUuiq33G+4dB3OraxmvMzex4Ipiqn1Q XX/E683C1Hm6MCGO5KjWRx/XjQS6K8Wi+41Hjan6XkYx36yXqkOrzcqMSVvGwrYQHkeS RcNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:date:from:dkim-signature; bh=qGzpjn13dVlcuHa3QfKLMJS0aiybXjJ4fJgb8JKEdS0=; b=UqWq0Pdyj+fGFq/92EBJHGarR3EdweNFBUIGaIZx9fl87fJ98u+2O6+aZMRLzNYQHh T/80QmMAxTz85xiJsnUiAWV37MmrojIgwtdCFWgjW5PKs/lq9FdlTsQa+1x2PMY9IgEy Ra8R4hiiVt6R/NKOrbYkly58ij9tWyjdVUEyImXGmyd+/uQTNAIZcRZP8gHL1CUPy4CE M/G8A/73wrZtTTSH80uy1OLEKSNLfVFYgX7HHMkZPHRbqum4+cFfugAldktqR0wkyoHU n298l/nUjKWIlL0iHJnaHpzsh0CPShJ3ZKy3FKMmICkvlBBHlm4X5k2nESO0NKmQvJGD gchw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iEpoNfjU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b17-20020a17090636d100b0078d148daf4bsi4254180ejc.409.2022.11.04.12.40.47; Fri, 04 Nov 2022 12:41:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iEpoNfjU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229639AbiKDTdH (ORCPT + 97 others); Fri, 4 Nov 2022 15:33:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbiKDTdD (ORCPT ); Fri, 4 Nov 2022 15:33:03 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62CA843AF2 for ; Fri, 4 Nov 2022 12:33:01 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id 136so1334376pga.1 for ; Fri, 04 Nov 2022 12:33:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :from:to:cc:subject:date:message-id:reply-to; bh=qGzpjn13dVlcuHa3QfKLMJS0aiybXjJ4fJgb8JKEdS0=; b=iEpoNfjUSPmVInj+LqC03wXnbIzcRmhgeZwez+hMwOhChOZJiBRq1S5KF7dMUzdhRs TyZtq+Iautgmig3VjOBjK5N+qtPcRucs5Pnz6722c6ahsdN0q3KtKaVo4h/ffyDrOnmQ 1+NqMwX5+Gai6f6NTzw8VnZqzwpHHkzEdI//U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qGzpjn13dVlcuHa3QfKLMJS0aiybXjJ4fJgb8JKEdS0=; b=O/cnE0ElY+iwhmtioNt/p8lFK4cQnEFNvpCmYGl/X3OQyafra8weWDNrTN2CXwqi6W A9wl7b5bHyjlj20CsENOibT0xlBg7/ldV6f+vuB9bX8VzQAJ/enYVF8TegcX4BgsNPbe I1SNicNHxfg6TCEHg60N/5aRN93z2H0uTEr937es0hyjBFCYmyLBs07yWmwIjzTbKJh3 MjFfUG1BWuocwEMcSp1+bKMgrJEB+DonPrkdF1pp8gv/vZJmtg5WpwgP3iXnknNUDlqy vjtHCsig2Ltsn/9dyTzSNBh1MJpK+u1f9qRojBI1e4jy655gv2+KBqFMSik7SnLrNL4J nyzA== X-Gm-Message-State: ACrzQf0afxT6Pb9p967TCSe95nJfcU5W8l10NacDe1ugd6CKrU1pUPnq ec3jwEyBebL/Yic8Xv2xaqN/eQ== X-Received: by 2002:a05:6a00:1309:b0:535:d421:1347 with SMTP id j9-20020a056a00130900b00535d4211347mr37370950pfu.5.1667590381090; Fri, 04 Nov 2022 12:33:01 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id n4-20020a63e044000000b0044e8d66ae05sm105054pgj.22.2022.11.04.12.33.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 12:33:00 -0700 (PDT) From: coverity-bot X-Google-Original-From: coverity-bot Date: Fri, 4 Nov 2022 12:33:00 -0700 To: Benedikt Niedermayr Cc: Krzysztof Kozlowski , linux-kernel@vger.kernel.org, Tony Lindgren , Roger Quadros , linux-omap@vger.kernel.org, "Gustavo A. R. Silva" , linux-next@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Coverity: gpmc_is_valid_waitpin(): Control flow issues Message-ID: <202211041233.4D45359E7@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! This is an experimental semi-automated report about issues detected by Coverity from a scan of next-20221104 as part of the linux-next scan project: https://scan.coverity.com/projects/linux-next-weekly-scan You're getting this email because you were associated with the identified lines of code (noted below) that were touched by commits: Wed Nov 2 10:02:39 2022 -0400 89aed3cd5cb9 ("memory: omap-gpmc: wait pin additions") Coverity reported the following: *** CID 1527139: Control flow issues (NO_EFFECT) drivers/memory/omap-gpmc.c:1048 in gpmc_is_valid_waitpin() 1042 spin_unlock(&gpmc_mem_lock); 1043 } 1044 EXPORT_SYMBOL(gpmc_cs_free); 1045 1046 static bool gpmc_is_valid_waitpin(u32 waitpin) 1047 { vvv CID 1527139: Control flow issues (NO_EFFECT) vvv This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "waitpin >= 0U". 1048 return waitpin >= 0 && waitpin < gpmc_nr_waitpins; 1049 } 1050 1051 static int gpmc_alloc_waitpin(struct gpmc_device *gpmc, 1052 struct gpmc_settings *p) 1053 { If this is a false positive, please let us know so we can mark it as such, or teach the Coverity rules to be smarter. If not, please make sure fixes get into linux-next. :) For patches fixing this, please include these lines (but double-check the "Fixes" first): Reported-by: coverity-bot Addresses-Coverity-ID: 1527139 ("Control flow issues") Fixes: 89aed3cd5cb9 ("memory: omap-gpmc: wait pin additions") Thanks for your attention! -- Coverity-bot