Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1026347imj; Wed, 13 Feb 2019 23:27:19 -0800 (PST) X-Google-Smtp-Source: AHgI3IaysFYfr5DwDIcMFBVx33wl9kUIXseqdGZAXAMqDi4cfwdJ4iPhIkwdBIj3Iv/hB2aw0G/E X-Received: by 2002:a63:9149:: with SMTP id l70mr26803pge.65.1550129239074; Wed, 13 Feb 2019 23:27:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550129239; cv=none; d=google.com; s=arc-20160816; b=Shag1uu2YLDhnp9xHE9R+N90AZVuXixiDvooMpM0LUuNnqgFIRLWfY1qFaKxpVk9Ja Ljv8dU/PBZ4DUV4ClV3t4hYvYzu35J+5A2hglUBg6ZxX4NjTRlXvJ7GLY2XGdanisyuE oNZRSJiMNlka186xYgknEWzY1tKoKnynDkTteeRMuRUeSGzZviuKUE3Y+Ece1gbkyp1O st5uTciyTDsDYhP4s26IjzK0F4xuyxNdZTeBxWKVSWUnRp7685tKDmFVOGOJ1pM0cK7z oKplcdze66HfM43Dt16asvgwUsoelpgvVVqDocPZwSbwKPpCFU39QCqVItRCSubeDSlX WovA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=F/KhtUTVYzeplfUmn3LKbi5rvF5rs8POUhFELFQtZsk=; b=w6JSOFJ1RMcnjMtDeHRDjLGk4FcX0hunJLdIYpkrLS7rTHMGCgEpZcyvPI0hwY0TsK xflrQSkFZc3nmVWUn+ED7uHkRF8meKavhUcN+YmjAYs163yLECLoKi7T23CaaebY8Bwy wa/TjcwMksVh5QgNNg7WOu2B2K+G6IZVrCOCjH3p7KZGShorbSZCbuDbPnDkn6UGxlNI GSthPBX0s8aNmRfshOuybWTRE20tBaWWdB8nj/AgKnvGWTKC73cqeMSTBPGJJAaPNHTi xVJT51VBrRNpdasERyuYGby7CuTxiz6eEEDzX9VlFizDtjCI7shUP1dWSdymCDDjPkMS VKug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=p7RAT97Y; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 15si1703361pfq.11.2019.02.13.23.26.37; Wed, 13 Feb 2019 23:27:19 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=p7RAT97Y; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392637AbfBMTMJ (ORCPT + 99 others); Wed, 13 Feb 2019 14:12:09 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:35193 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726389AbfBMTMI (ORCPT ); Wed, 13 Feb 2019 14:12:08 -0500 Received: by mail-lf1-f67.google.com with SMTP id v7so2677445lfd.2; Wed, 13 Feb 2019 11:12:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=F/KhtUTVYzeplfUmn3LKbi5rvF5rs8POUhFELFQtZsk=; b=p7RAT97YTlBXw/YIT7/wlPZws3hCIX7QrN1+MS/F3nFGN1hcy83hMKihSmB5mBNTlP yifwAXSiFSp8RkI/f6XE9aswOacA30cGPPeE1X1Q2BLKun2dvc+M+KqmW91vS7TBTW9Q a5MhpbxHG+FbH9VXnWt8dbW1e3NKeb9Xa4PskGUEen1XtmORcvBaQgDsk13+UEGPp/bL zXmM3iEKKanjWonn+DDXBsXhLf4Q95gtBflGLM99nb83WudpJ4U7BWkR/e8ua6A6cKy5 07chTEkouqIwbDirNE1giJ2NL/9/AWwT33W+eGg/7OhIWoKZtxfKfjGuitHGvJQsCO+o V61A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=F/KhtUTVYzeplfUmn3LKbi5rvF5rs8POUhFELFQtZsk=; b=Ue/qAeupNDOHet/gLc6Ab5pkeSsb+MRLLSTDQnmstVm2i8LYuehjz2fRhLDdjA/5/b dRcEzMwjn1X3DQTH6UGNgK3vA8RyRohZqolVLstzNkUGQIf4+Cm1R2T45BfkVpvM24gj gs+S8Co3crfTF7aYzs6vpEaPJlC8fI7bxUN63OCxCS6LGWih14o3Onw2EU75y9ZW57co aXSRvbGIp+VIrzmBnjnLp9NxoF0Fxi2V7Km4VAESF2rjZz4hABc7+FczsgEe1fNqLedv 7YlxN/u0dAsTFYwS7L64xM/zd02xNpyEzxVnUoVtsIV0v0i+uc1gEfkKZaIqZkpCVfYN wT3A== X-Gm-Message-State: AHQUAuaW0nrQ1Kj9HgixFZDp4ySRQfJoKg0dejoItQX/LqhInThZAL9x TM0rCKF0v+Gjv2s8Tz4e+tZJs1CtRac= X-Received: by 2002:ac2:43c6:: with SMTP id u6mr1314803lfl.102.1550085125959; Wed, 13 Feb 2019 11:12:05 -0800 (PST) Received: from localhost (89-70-37-207.dynamic.chello.pl. [89.70.37.207]) by smtp.gmail.com with ESMTPSA id c8-v6sm18347lja.46.2019.02.13.11.12.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Feb 2019 11:12:05 -0800 (PST) Date: Wed, 13 Feb 2019 20:11:43 +0100 From: Tomasz Duszynski To: "Gustavo A. R. Silva" Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Kees Cook Subject: Re: [PATCH] iio: chemical: sps30: mark expected switch fall-throughs Message-ID: <20190213191142.GA23470@arch> References: <20190213024842.GA25131@embeddedor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20190213024842.GA25131@embeddedor> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 12, 2019 at 08:48:42PM -0600, Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch > cases where we are expecting to fall through. > > This patch fixes the following warnings: > That have been already fixed by this commit available at Greg's staging tre= e: 59b9bb0 iio:chemical:sps30 Suppress some switch fallthrough warnings. > drivers/iio/chemical/sps30.c: In function =E2=80=98sps30_read_raw=E2=80= =99: > drivers/iio/chemical/sps30.c:289:4: warning: this statement may fall thro= ugh [-Wimplicit-fallthrough=3D] > switch (chan->channel2) { > ^~~~~~ > drivers/iio/chemical/sps30.c:299:3: note: here > default: > ^~~~~~~ > drivers/iio/chemical/sps30.c: In function =E2=80=98sps30_do_cmd=E2=80=99: > drivers/iio/chemical/sps30.c:120:10: warning: this statement may fall thr= ough [-Wimplicit-fallthrough=3D] > buf[1] =3D (u8)SPS30_AUTO_CLEANING_PERIOD; > ^ > drivers/iio/chemical/sps30.c:121:2: note: here > case SPS30_READ_DATA_READY_FLAG: > ^~~~ > drivers/gpio/gpio-eic-sprd.c: In function =E2=80=98sprd_eic_irq_set_type= =E2=80=99: > drivers/gpio/gpio-eic-sprd.c:403:3: warning: this statement may fall thro= ugh [-Wimplicit-fallthrough=3D] > switch (flow_type) { > ^~~~~~ > drivers/gpio/gpio-eic-sprd.c:435:2: note: here > default: > ^~~~~~~ > > Warning level 3 was used: -Wimplicit-fallthrough=3D3 > > This patch is part of the ongoing efforts to enable > -Wimplicit-fallthrough. > > Signed-off-by: Gustavo A. R. Silva > --- > drivers/iio/chemical/sps30.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/iio/chemical/sps30.c b/drivers/iio/chemical/sps30.c > index e03a28a67146..f308d8ddceec 100644 > --- a/drivers/iio/chemical/sps30.c > +++ b/drivers/iio/chemical/sps30.c > @@ -118,6 +118,7 @@ static int sps30_do_cmd(struct sps30_state *state, u1= 6 cmd, u8 *data, int size) > case SPS30_READ_AUTO_CLEANING_PERIOD: > buf[0] =3D SPS30_AUTO_CLEANING_PERIOD >> 8; > buf[1] =3D (u8)SPS30_AUTO_CLEANING_PERIOD; > + /* fall through */ > case SPS30_READ_DATA_READY_FLAG: > case SPS30_READ_DATA: > case SPS30_READ_SERIAL: > @@ -296,6 +297,7 @@ static int sps30_read_raw(struct iio_dev *indio_dev, > > return IIO_VAL_INT_PLUS_MICRO; > } > + /* fall through */ > default: > return -EINVAL; > } > -- > 2.20.1 >