Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp663615rwl; Thu, 23 Mar 2023 23:36:47 -0700 (PDT) X-Google-Smtp-Source: AK7set8T3R5ZJaZVAjqLVtS0kNF5BH49qx6PZrdkEcf0V4bznUcJ0qEsn4kO5q6kFQB2zveCn/dy X-Received: by 2002:a05:6402:cb5:b0:502:2cb:dd10 with SMTP id cn21-20020a0564020cb500b0050202cbdd10mr6638781edb.6.1679639807285; Thu, 23 Mar 2023 23:36:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679639807; cv=none; d=google.com; s=arc-20160816; b=J77lFSHeUs84KzbknIh+VAkD/ghnPOOjKaMWtMHb6VfhooW6/UHsgjKMha8rDO7V+J hibV7zSjhaDODs4Tj3MH63RN+bE99DT22XmzAIg7Owzrbi3FOHrxlLYXIzFdkSZH3RQT +b+RYWwrxt1DrzfXvEF2T6xpe8t2YOWtxIFBAY9yC9DW1Mw6j6Fn8rVKZXvBsbxUetaF ATHQ4OP8EpFhnP4/5ceje8DCigbpkH+yztRIs3gh+XBYEyf92Vc06asSLQpG+z+qbo5k ks5jyd7tTW+K+0QDpM3xETWZvogdigCGx9QdZVZzQFvSfPeTydPD1UahBBiJ33TZTRY0 Re5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fCS01EGl3JC6haV+MkG2aQ+tOjHiTLDlklWP2u8H+R8=; b=beWbeqJ36uMfNvjy/Zd7x5hRzBxZIZhvOfNjAh3fYiW5fysqyNWnICe4k7Qcp/SHYj Xwp86DGjBULGoGdaOOsLRH7z/plZl0DHZt+XSsJbqiauFsJpKIwruKeGZxzsxHLmkvh5 TyCHoiONuSRB4Q56jn/UhZmaikigX2/vl0KsqmPqZJMhgHNj32MGK2CSUw/Me4/Ce8MI ZMMKWW9y56CxqIdGHoeHRzrJHHbcViJNBU4ZvEqgWeDkXWAjl+wMONOuAIg8+SP6CuoD p3stFUdhaWYiKaVnN+/1k5mV9yUUSTzbJwODOnNYK8RrUKjLS+88+7aygdJyYn4Ji85h QqtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=O1Al6aJD; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d19-20020aa7d693000000b004af625a0f8esi21481578edr.395.2023.03.23.23.36.22; Thu, 23 Mar 2023 23:36:47 -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=@gmail.com header.s=20210112 header.b=O1Al6aJD; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231724AbjCXGUM (ORCPT + 99 others); Fri, 24 Mar 2023 02:20:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229817AbjCXGUK (ORCPT ); Fri, 24 Mar 2023 02:20:10 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 433B41724; Thu, 23 Mar 2023 23:20:08 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id x3so3667302edb.10; Thu, 23 Mar 2023 23:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679638807; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fCS01EGl3JC6haV+MkG2aQ+tOjHiTLDlklWP2u8H+R8=; b=O1Al6aJDIq2eRLxnWTqpBJZGpIxvuVvg8T/crw/gGwtAEhyUAIRUrOZzXaV2X6U6lB f6HWfhQNpjf+6Exqa9ILIqHlIreO1u42tM1bPO9b03hXYnRKKsJ5a6THXNq50CHszFMZ muPhg2dGqIGOVA9RIw8Oi3FZoPJiYacT6dhwGFog90TgmdPQAisDnRGUFP4v3UtsALlY W4Dyjsk9431EgfAUveqLxzXSpqcXZAb5oGXjw6IrZ8mmt1LjR90wsK89yzJ+XSNq3GVu 8T8+s9GdQ8Ti6+gyGup9t2v5mWa9mgwvhgW2WOJSaVHeKu/Ilu0CmQEEiLqKnUQ0IlZe 5Yrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679638807; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fCS01EGl3JC6haV+MkG2aQ+tOjHiTLDlklWP2u8H+R8=; b=3YkJ85As2ypxupaDgxebRBk6RlA4HaQZPkyuhEwsNoyDuHRbnGE3WKXxc9GJEmNMv1 /1SUSFl53lAJvjZ7IKUoLMYG4tmGEZX4G42Cc+c1IYu/Nuek6ZpvwHKWDD4QM7t6N2EK Cq8QOSnRiNXa6KH0n8yDUToHDGNprYiyFtdDt4hCUHtd+T2VK7zBSzHKONo9qWrCvybh sdZVJR9Bk8KpEWsVfF3la9JUWBMR7Jjf9FnC5WFWkyufs8kJ/Sl+jKvrbCsDDKG7DMZ5 Z2Dc/El1qBUR5V1fRX/HSoRGNAmWaxM5Y7F60UNQuUydTPSE8heUHHtShFM0/U4m+2eq Ce3A== X-Gm-Message-State: AAQBX9cSLyxBzm1uJaSxh3+Yp2z4foegYR6cP0ZUbb2zHzCyVR+rLIFu WQNZZ9A09zO7kGAgfecvyYo= X-Received: by 2002:a17:906:3850:b0:930:b35b:5a53 with SMTP id w16-20020a170906385000b00930b35b5a53mr1336270ejc.16.1679638806549; Thu, 23 Mar 2023 23:20:06 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id o7-20020a1709062e8700b00933356c681esm8189313eji.150.2023.03.23.23.20.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Mar 2023 23:20:06 -0700 (PDT) Date: Fri, 24 Mar 2023 09:20:02 +0300 From: Dan Carpenter To: Mingxuan Xiang Cc: Thinh Nguyen , Greg Kroah-Hartman , hust-os-kernel-patches@googlegroups.com, Dongliang Mu , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] usb: dwc3: host: remove dead code in dwc3_host_get_irq() Message-ID: References: <20230324060934.1686859-1-mx_xiang@hust.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230324060934.1686859-1-mx_xiang@hust.edu.cn> X-Spam-Status: No, score=0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 On Fri, Mar 24, 2023 at 02:09:34PM +0800, Mingxuan Xiang wrote: > According to the description of platform_get_irq() > * Return: non-zero IRQ number on success, > negative error number on failure. > and the code, platform_get_irq() will return -EINVAL > instead of IRQ0. > > So platform_get_irq() no longer returns 0, there is no > need to check whether the return value is 0. > > Found by Smatch: > drivers/usb/dwc3/host.c:60 dwc3_host_get_irq() > warn: platform_get_irq() does not return zero > > Signed-off-by: Mingxuan Xiang > --- > v2->v3: remove curly braces > v1->v2: remove redundant goto > Only compile tested. Reviewed-by: Dan Carpenter regards, dan carpenter