From patchwork Wed Sep 30 09:02:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 11808503 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8687D618 for ; Wed, 30 Sep 2020 09:04:49 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4A2E820754 for ; Wed, 30 Sep 2020 09:04:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YNpXiJ2s"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="GcxUuD3w" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A2E820754 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=grFXrGFfquvOSBWX0c+GKIJa59A+YJAVmWPjB9ekeLA=; b=YNpXiJ2sUGFaXqSA6Omc26Hnab Km6bDHfGgbYv4cSGUF9KOa1zgneY7iP1IgV+rK7XtmctrNrba07x1sCKxjio4Z1f7CicoSbpztY1Q 9GW3wrjm1SRTDkHwJdRPEoDtZyO1FTgVZLAFTDIX5+/mokzbzAnbO+GfZCs2mqK2Tp9bVhLHXZ9nX e0vmcv6h8jyp8Tr6QYI7NdRg+NsWOSw3SVZjSWjwwoSQEG5cMexDa8BWxpbw3V3b5vu4GOAVMUI5q Selj00v0XBI0pFFOMd03p7DQJdu4+tLQtswg9b2fYRjfb8p75j64wfvi9WVinZinxGc+L7yCQcXzE Pn5RMY5w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNY13-0005NG-VD; Wed, 30 Sep 2020 09:03:13 +0000 Received: from userp2120.oracle.com ([156.151.31.85]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNY10-0005Kl-6o; Wed, 30 Sep 2020 09:03:11 +0000 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08U8x5Kh062337; Wed, 30 Sep 2020 09:02:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2020-01-29; bh=J8BixLmPCG+/UMQLvEIgqzyFL9iqxTWES2YfuUo0riQ=; b=GcxUuD3wfWj2mBb46I6n4M8kZoKd90sAkkxQYLKY54O9MCVp/J/kzpAr1FYLIwWXU/4O c/QhH31NgfFPFxl3ljeDlQx3TRR9GdCrFomkfBF/ehzJsyPSkpGi/Yu/R83J1225QwCV WBtID25qkHkEIMlGKJOMjfwFBXyax4Hymz22aALr4WA5snJzr1x+VG6dlOM6ewu7tB35 exLkt/ozMr8NQ8Q3OwVBqaWanaJHVW3OcDmoOOww1zNgYInkhCFbFgsttsFM19LastTX CYmOs+o6HYMnMQHkblPQa6YKFdHPN14+4fGczMeFT/QX5Rn7zyE//7guD2YUCiX5eoUH pQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 33sx9n7bex-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 30 Sep 2020 09:02:56 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08U90U9o080916; Wed, 30 Sep 2020 09:02:56 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 33tfhytbm6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Sep 2020 09:02:56 +0000 Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08U92kTR009794; Wed, 30 Sep 2020 09:02:47 GMT Received: from mwanda (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 30 Sep 2020 02:02:45 -0700 Date: Wed, 30 Sep 2020 12:02:38 +0300 From: Dan Carpenter To: Nicolas Saenz Julienne Subject: [PATCH] staging: vchiq: silence an uninitialized variable warning Message-ID: <20200930090238.GA621698@mwanda> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9759 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 bulkscore=0 phishscore=0 malwarescore=0 adultscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009300072 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9759 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 phishscore=0 mlxscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 spamscore=0 impostorscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009300072 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200930_050310_394280_2D26D613 X-CRM114-Status: GOOD ( 21.87 ) X-Spam-Score: -3.3 (---) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-3.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.4 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [156.151.31.85 listed in wl.mailspike.net] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [156.151.31.85 listed in list.dnswl.org] 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines -0.5 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Arnd Bergmann , Greg Kroah-Hartman , Marcelo Diop-Gonzalez , kernel-janitors@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Jamal Shareef , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Smatch complains that "userdata" can be passed to vchiq_bulk_transfer() without being initialized. Smatch is correct, however, in that situation the "userdata" is not used so it doesn't cause a problem. Passing an uninitialized variable will trigger a UBSan warning at runtime so this warning is worth silencing by setting "userdata" to NULL. Fixes: a4367cd2b231 ("staging: vchiq: convert compat bulk transfer") Signed-off-by: Dan Carpenter Acked-by: Arnd Bergmann --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 590415561b73..71b962777da5 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -952,7 +952,7 @@ static int vchiq_irq_queue_bulk_tx_rx(struct vchiq_instance *instance, { struct vchiq_service *service; struct bulk_waiter_node *waiter = NULL; - void *userdata; + void *userdata = NULL; int status = 0; int ret;