Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp8903ybt; Tue, 23 Jun 2020 13:53:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuwomnmfWhzNbLaInVA4ItYOJofw31nYo7/lqafTk7g0VsJYbCAM46Q/MS7LJSZpBWcfl0 X-Received: by 2002:a17:906:c943:: with SMTP id fw3mr3819305ejb.55.1592945619463; Tue, 23 Jun 2020 13:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592945619; cv=none; d=google.com; s=arc-20160816; b=X6QTT9Vh6+edFzYsbtDo0ei4CvKbCQCsAu00qNCC9RocF7w641psXhin16F6lPX5sC GDFbK+/MSh4Ub6MHkidp28nYRDCNlrfm34tmNunRB1B7oiBRiRsTGUUyPLGzrek0/G16 ZHM3XAEVzyIEKW1WwcRk+XjH7dXd9hD678zyfYD560cypp41znCMczATvoBckz1bEYud bvQPerDICCgs9Tbo1xL488+NiCfDkP4MbtsKI7JTZGPKUjVvNxilgnP1M0cPSCpL5oyM fUFNjuV1uOs0OnmHZqVH8f8ce98HKkpH4P6MbycNzJbtWCnyrNz+mab9KaKxDczbiEcw Nd6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FpMZHkPXzgZM3WglWUqUuLk2PCtzOM8JZr31psn60+s=; b=NM0RO1iJE4shHRMdUAM1WTRiAEM26zt32DUjy2VbIeblH2746n/gFeep4+GeFRayJJ 9qTGi0/zrbMsFX4B1qweQ1u2h/l1c/aPweQv/hdw9cuYUaFqzTjh8JfwFJVqVgpZRvjM hUteMnIIi67WQvYZrPg/nBpdPlZebtBDIioRC5g67mfjhXg2Q19/mNoJKL/yRRUo0Qp5 8Jl+XHjtybk+KWmuh63FnwSsQQN8OtHjczE2xT/5X9iQZr7sNEd9fEj481QGVXbKj2VO BTzwMWuqHnCJbDwkpVxQ/LA9gGAf60k57CjIelS/NtWn9hgQsz0rtzjhSdP9Qdh2Da6i 8GCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=R7pbdl55; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 88si3299025edr.154.2020.06.23.13.53.15; Tue, 23 Jun 2020 13:53:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=R7pbdl55; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390791AbgFWUv5 (ORCPT + 99 others); Tue, 23 Jun 2020 16:51:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:46284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403959AbgFWUrm (ORCPT ); Tue, 23 Jun 2020 16:47:42 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0FE2520781; Tue, 23 Jun 2020 20:47:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592945262; bh=DspF4mRpvdIHBDbtUS+l6DngaJ7lWk6C5tuTK4ZcaIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R7pbdl557MxmdzTqgXfHxXLC+j2bnEI7Z7WYcNaboVdjWfvxlNx1QfRvLz5UA5nfx 61dPit/DW43IjGm92MSrmAUYnSs2eJtGI6QIAGa/6HOZZs7U6myZP2XVhm/Hv1AsXr njCDwvAJQVm6+jhPqI/EGBAgYK1jUsGvQ2E6xlxM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nick Desaulniers , kbuild test robot , Nathan Chancellor , Felipe Balbi , Sasha Levin Subject: [PATCH 4.14 072/136] USB: gadget: udc: s3c2410_udc: Remove pointless NULL check in s3c2410_udc_nuke Date: Tue, 23 Jun 2020 21:58:48 +0200 Message-Id: <20200623195307.304210269@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195303.601828702@linuxfoundation.org> References: <20200623195303.601828702@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor [ Upstream commit 7a0fbcf7c308920bc6116b3a5fb21c8cc5fec128 ] Clang warns: drivers/usb/gadget/udc/s3c2410_udc.c:255:11: warning: comparison of address of 'ep->queue' equal to a null pointer is always false [-Wtautological-pointer-compare] if (&ep->queue == NULL) ~~~~^~~~~ ~~~~ 1 warning generated. It is not wrong, queue is not a pointer so if ep is not NULL, the address of queue cannot be NULL. No other driver does a check like this and this check has been around since the driver was first introduced, presumably with no issues so it does not seem like this check should be something else. Just remove it. Commit afe956c577b2d ("kbuild: Enable -Wtautological-compare") exposed this but it is not the root cause of the warning. Fixes: 3fc154b6b8134 ("USB Gadget driver for Samsung s3c2410 ARM SoC") Link: https://github.com/ClangBuiltLinux/linux/issues/1004 Reviewed-by: Nick Desaulniers Reported-by: kbuild test robot Signed-off-by: Nathan Chancellor Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin --- drivers/usb/gadget/udc/s3c2410_udc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/usb/gadget/udc/s3c2410_udc.c b/drivers/usb/gadget/udc/s3c2410_udc.c index 394abd5d65c02..cf12ca567e692 100644 --- a/drivers/usb/gadget/udc/s3c2410_udc.c +++ b/drivers/usb/gadget/udc/s3c2410_udc.c @@ -268,10 +268,6 @@ static void s3c2410_udc_done(struct s3c2410_ep *ep, static void s3c2410_udc_nuke(struct s3c2410_udc *udc, struct s3c2410_ep *ep, int status) { - /* Sanity check */ - if (&ep->queue == NULL) - return; - while (!list_empty(&ep->queue)) { struct s3c2410_request *req; req = list_entry(ep->queue.next, struct s3c2410_request, -- 2.25.1