Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2839478ybb; Mon, 30 Mar 2020 14:08:30 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtojjzhmPKRYO84V3kXHM0Tmjj9F29+ezS+B85ag6bCh7ppgzzFyaCON5eo1S0TdvxMuYYv X-Received: by 2002:aca:4e47:: with SMTP id c68mr46923oib.16.1585602510652; Mon, 30 Mar 2020 14:08:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585602510; cv=none; d=google.com; s=arc-20160816; b=z4e8dgjflvUkxfZYEZnjUxqqKsDjrcKkqHHTRMxrlqXdumGDhzz9n2V/jClcSQwgJY KcA1dSJWdYFtG7yJEwNiHMVxBgyLvZSv1d7VQZ08P411PRZgW6AZSY/Ex+ie0bxJwgCZ nSDkXESM/u8YiOkS3XYJY+szIH6c2ufWxXCwPuzjuC3lDRkVfgrjGzNQERbAlVq3NcFi B1MXSneOg+M69YJaLZz8NDlIWHuejdlHV1G3F+08F/NYLuYSxST28+JR58W9Wu/e4kmo lKLAyr5Mm7gXyiWLxfVR1kGeVsbK4PudVh1C+qhTqDg6ehUWMVMwYsF4iMxqEoiAK3hQ eWrg== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=O5orfkpIWxG4X0fim40qmaOHzOaHEPG36AFc1Y+7h+M=; b=HARfVqgiL4+Qd847E5hyl1cYRHBOpZ+5WFXELRPHL5DnoDA8y7lKNH1Cov+NRFo1uK krL0J6hudC64KSkLqhzkMdAzpxiCRetIM8VHdUvVZ0jnxUjvTd4gvnD10n7GNa++LUjZ zZvouay9q5Rm7gQg0QayFGazsdNAaBqmWAO55ke9OXHElLHZxxibnRBoB64zloFYqtHS 0ErX5n0KRJoQpFjvRvGuY40wu5WDCMQ4CU2J4XqTdp28BtH9fBw5u/BvQ11fvifOAxl6 qqEygEO5kbL4cXe6c0Gl+tqJ5vd3XrOWtNWuC3gYAUGAIjR2AG5FZZ0WwbQD9lx6TUkd mQJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=O6mWpXNn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x136si6126506oif.122.2020.03.30.14.08.17; Mon, 30 Mar 2020 14:08:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=O6mWpXNn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728880AbgC3VGu (ORCPT + 99 others); Mon, 30 Mar 2020 17:06:50 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:45333 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728370AbgC3VGu (ORCPT ); Mon, 30 Mar 2020 17:06:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585602410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O5orfkpIWxG4X0fim40qmaOHzOaHEPG36AFc1Y+7h+M=; b=O6mWpXNnwpSfjsw+G7L4E8era2vUJYSlFo5Y+LKQGkjzrh6++mtgrhUsfx/zzbz2yCk9BO 4wxPsR6zp+lBdKulFZcg12eTHaG22LVDmI2eFa6YvMwyh8Fw/i2kSv7y3MhOZ3liDLTQZX N0gaXPQ0FQMecRel0ZALJa3fnnkr73M= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-367-H3ehbNgZPFCmGVZexGte0w-1; Mon, 30 Mar 2020 17:06:48 -0400 X-MC-Unique: H3ehbNgZPFCmGVZexGte0w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 275CA18A6EC0; Mon, 30 Mar 2020 21:06:46 +0000 (UTC) Received: from elisabeth (unknown [10.36.110.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A26CA48; Mon, 30 Mar 2020 21:06:42 +0000 (UTC) Date: Mon, 30 Mar 2020 23:06:34 +0200 From: Stefano Brivio To: "John B. Wyatt IV" Cc: outreachy-kernel@googlegroups.com, Julia Lawall , Forest Bond , Greg Kroah-Hartman , Quentin Deslandes , Colin Ian King , Malcolm Priestley , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [Outreachy kernel] [PATCH v5] staging: vt6656: add error code handling to unused variable Message-ID: <20200330230634.3b905158@elisabeth> In-Reply-To: <20200330184517.33074-1-jbwyatt4@gmail.com> References: <20200330184517.33074-1-jbwyatt4@gmail.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 30 Mar 2020 11:45:17 -0700 "John B. Wyatt IV" wrote: > Add error code handling to unused 'ret' variable that was never used. > Return an error code from functions called within vnt_radio_power_on. > > Issue reported by coccinelle (coccicheck). > > Suggested-by: Quentin Deslandes > Suggested-by: Stefano Brivio > Reviewed-by: Quentin Deslandes > Signed-off-by: John B. Wyatt IV > --- > v5: Remove Suggested-by: Julia Lawall above seperator line. > Remove break; statement in switch block. > break; removal checked by both gcc compile and checkpatch. > > [...] > > @@ -734,14 +738,15 @@ int vnt_radio_power_on(struct vnt_private *priv) > case RF_VT3226: > case RF_VT3226D0: > case RF_VT3342A0: > - vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL, > - (SOFTPWRCTL_SWPE2 | SOFTPWRCTL_SWPE3)); > + ret = vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL, > + (SOFTPWRCTL_SWPE2 | > + SOFTPWRCTL_SWPE3)); > break; > } > + if (ret) > + return ret; Did you send the wrong version perhaps? -- Stefano