Message ID | 1dff4d9b-d067-4525-95e0-ffdc1185cccd@moroto.mountain |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b90f:0:b0:403:3b70:6f57 with SMTP id t15csp98725vqg; Tue, 31 Oct 2023 02:00:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFE1S55AhIlE6mKgSNaHyiiWfOFpGjhr4Ab0vzQV8/YLleHE9l/UZWiF2RIABXD8le+YiGt X-Received: by 2002:a17:90a:c90f:b0:280:256c:abae with SMTP id v15-20020a17090ac90f00b00280256cabaemr5289171pjt.40.1698742844835; Tue, 31 Oct 2023 02:00:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698742844; cv=none; d=google.com; s=arc-20160816; b=tY7dnzarlXFGwhxKTqe3zncSJQeklb/YwjH2GsTMRMe3bm0p5ETNbywlgwgeo5J9wZ 2f2wdgaCSk63lL45WwIdCh/posNSCbRgUqbN2CcTLgWscyq2TiWYhjHlhOL4FyWndD9a W8uxQM2t0wnmDaK98k5uWOwjgot6eyhT1r26cb0qE5HEw4tJ7Qq+4e4lgFCubxqYuEIa 9ilCqpnOsrfSv5CzeX7hf0gFyainhDtURL4ywOZwJwWjjkXyjy73JS0BDxGOTU5FsDtE jk9PQJTcoRgppcHE8WFoUIsoJGHZEwp9+gPpKGZ2x3V8ycckWXfeXyyvEUeBfybh8SVT GSCg== 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:from:date:dkim-signature; bh=tNOnxQseUn+sdzcn++tRPmK5DAb/ytwQ21KP2ZD3yF8=; fh=utjgZKIVCP6yXYqGBa7DhFmVtTnA4+hjUkOuUHHWT2Q=; b=VHiTiUOWxqJiFtqm7SwMi5AgrMj/LTYebeMlBp5vtwafeDjssSVl2jN0POypQB+bN2 EP5kahh/Dy43pUIbA4+9py3uIMb1XK3GHXiSowT/sWUyY4TWBYly2clCF1z4YupAnH1G LCeRVY6uA7MQkYmhYpePM7GlKe30DVPrpTdKO/unAJje9KZ2qUYfym8YALrrmroB68yZ xzYP4+255KUPuBZoPvSNAsi4fUd0DlGFIyU2T5oM9iwSLfYz8JH4VnJcX4GxAljSpYNX xr5tjVpKtWHABNzrpyB1IKsgAjPHD+oS0R0NRrOcCttbVBsbEf5PTfcfY84uR4qbeHTz DjRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J6nCG4YF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id fa24-20020a17090af0d800b002804113621esi668550pjb.100.2023.10.31.02.00.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 02:00:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J6nCG4YF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 144D080C5C9C; Tue, 31 Oct 2023 02:00:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235751AbjJaI7t (ORCPT <rfc822;gah0developer@gmail.com> + 34 others); Tue, 31 Oct 2023 04:59:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235761AbjJaI7m (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 31 Oct 2023 04:59:42 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C517611B for <linux-kernel@vger.kernel.org>; Tue, 31 Oct 2023 01:59:39 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-50797cf5b69so7458651e87.2 for <linux-kernel@vger.kernel.org>; Tue, 31 Oct 2023 01:59:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698742778; x=1699347578; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=tNOnxQseUn+sdzcn++tRPmK5DAb/ytwQ21KP2ZD3yF8=; b=J6nCG4YFqgEFdX1t0NzbCF48/yxhDKHE3rp2/7yzhr40yH+l7JCa9OQFMwidONwCHc apjDRXhPwaB1imBLjzuRvuVZSj3rS0RDE2fNLLOU6NM1zY4M/4/uvtn3ohhJ5AxjxvIa FM8yfqNknfNjS0CV0Em5Z4ZwRAnQzu/+qtWY4pxuV0rWWiXD5oLQ1AY86TrSdH4jHIRy F0J1z+0nWURU4gcYgRj/XG06iubZOHM6wHAXCIuptqZHJDJXBrGlb6FDvxul7IJRpXDn Ph32JhVrXN896YkHGrGPl3ghD/+QCXcdPiep/8kALWMpB3ZmrIct91FaUrlrCli30jgh 5LvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698742778; x=1699347578; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tNOnxQseUn+sdzcn++tRPmK5DAb/ytwQ21KP2ZD3yF8=; b=rKffavWAPJDuXa0yerV0VnZfPM0IBwl1KTTy2FbLXNVSdjDe4vmawuF3466pepwT7A eWjJ7Yp1ghCEyJhMf8V2mmcFSfbse2oUVK6e+TBxpO354Bju5vdZgYXzzfegAjLmTCV8 aH5xkzG6rXa9xVZWMmC6ftYPM+kHiuJLqk4wLgexxGMa9k3dwXVD8kNT+bAHbItYu6OC wvksYvaoMHEyCpVlxS0IsLlKqJyl4kj6wfsvv+o3NVuucr7khLtHuu9W2DJO8gMXkhYm YnBGrbaDo+BJVO/7UJkuFmXC8rSPzzr/fOrTtGqYKo61y4WODVtqfISwhynyroFAs3xP fHqw== X-Gm-Message-State: AOJu0YxhFJP+A5Bu/RV7g+jw09MA+l3XK/vVL3lO7yQULHsqf1eMKSok UyQidSOcjc1k0ppEgngRlyY2iQ== X-Received: by 2002:a05:6512:ea8:b0:507:ac56:66a0 with SMTP id bi40-20020a0565120ea800b00507ac5666a0mr8295514lfb.56.1698742778001; Tue, 31 Oct 2023 01:59:38 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id o11-20020a5d684b000000b0032f9a0fe0absm103388wrw.96.2023.10.31.01.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 01:59:37 -0700 (PDT) Date: Tue, 31 Oct 2023 11:59:34 +0300 From: Dan Carpenter <dan.carpenter@linaro.org> To: Florian Fainelli <florian.fainelli@broadcom.com> Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Umang Jain <umang.jain@ideasonboard.com>, Stefan Wahren <stefan.wahren@i2se.com>, Kieran Bingham <kieran.bingham@ideasonboard.com>, Phil Elwell <phil@raspberrypi.com>, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] staging: vc04_services: remove unnecessary NULL check Message-ID: <1dff4d9b-d067-4525-95e0-ffdc1185cccd@moroto.mountain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 31 Oct 2023 02:00:07 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781260976942734572 X-GMAIL-MSGID: 1781260976942734572 |
Series |
staging: vc04_services: remove unnecessary NULL check
|
|
Commit Message
Dan Carpenter
Oct. 31, 2023, 8:59 a.m. UTC
We ensured that "service" as non-NULL in the previous if statement so
there is no need to check again here.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
Hi Dan, Thank you for the patch. On Tue, Oct 31, 2023 at 11:59:34AM +0300, Dan Carpenter wrote: > We ensured that "service" as non-NULL in the previous if statement so > there is no need to check again here. > > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> LGTM, Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> > --- > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c > index 39b857da2d42..a0117efa2991 100644 > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c > @@ -2040,8 +2040,7 @@ sync_func(void *v) > continue; > } > > - svc_fourcc = service ? service->base.fourcc > - : VCHIQ_MAKE_FOURCC('?', '?', '?', '?'); > + svc_fourcc = service->base.fourcc; > > vchiq_log_trace(state->dev, VCHIQ_SYNC, > "Rcvd Msg %s from %p4cc s:%d d:%d len:%d", > -- > 2.42.0 >
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index 39b857da2d42..a0117efa2991 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -2040,8 +2040,7 @@ sync_func(void *v) continue; } - svc_fourcc = service ? service->base.fourcc - : VCHIQ_MAKE_FOURCC('?', '?', '?', '?'); + svc_fourcc = service->base.fourcc; vchiq_log_trace(state->dev, VCHIQ_SYNC, "Rcvd Msg %s from %p4cc s:%d d:%d len:%d",