Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2474160ybi; Thu, 4 Jul 2019 11:55:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxnrj4tq2kEzgfBn8ynHgK2tKiDyvvLCfT2bdQz6kHQVonSShZdLlMbT8C9anE1jxZ5aQrV X-Received: by 2002:a63:1b66:: with SMTP id b38mr36843pgm.54.1562266507673; Thu, 04 Jul 2019 11:55:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562266507; cv=none; d=google.com; s=arc-20160816; b=da2gD6u3jBHbjFdnExUnw3jFKt6qVFJW0iWoavQ/9rtIvc5NT1/nmV/gF75bCrg4kJ QXgaji0xzJUecqSQjXrKY6Ea7BHYf6mnRuog7dbGfUhMKmJYtRp7bQbynYJk6bey9WIh F5acv0nPiWFWjf3Nb3RZ3jxzqTORAlGeIyD6Xn5eMxeSeeaFAQya7FQgFETv0zqHZdNT efmj4V/pjfqYYHxwhLSDmwdo8/oGo+qjpYh3Q21x5HMPAcXGRR6C7KCw1nE9nnOiYqZ4 tP/lmuHXKgw36l22/PWdBSF7ZDIpO/ES20h2ApfwVoV8ylQbEMu7ioG6zBkgsrKMbyCR pGCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=YsAlp4ULFAEt/KZTRgfVhPSsETI930mXTk+ASwru2g0=; b=EnOzyA37czEgW6iyQ2MV1INjuY5drcYxdkFeNhYpTPK9jvHK6bDeV9yxYMu1j4D6db 6zHAr19CBvWV1SRH0GDIha0ojt/d3EUXxe4pQPrzW5MHlp9y8S5cumoJBRKD3MPfjKAk ruigXJtF2Xx88W8dB+kwJKld0tD0zy3MbifMMuKOopmFAnX1fl/KTSb06r9Xj4AA3sgj fYvz+g2IfLLUujGfVIELES7xPaM49EsaKiw6WFzNnvf0qK8iWCd+PmCEy430ESPp3mJ2 I7AnNvGB9xHGuhUJeE1pn1PLLaCJnjDqIN53Po5isVUrzPCWXkqJEuVJPPu7W+VLHcoa u6UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Du2gavV9; 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 u71si6455060pgd.279.2019.07.04.11.54.52; Thu, 04 Jul 2019 11:55:07 -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=@gmail.com header.s=20161025 header.b=Du2gavV9; 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 S1727279AbfGDSq7 (ORCPT + 99 others); Thu, 4 Jul 2019 14:46:59 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:38975 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727259AbfGDSq7 (ORCPT ); Thu, 4 Jul 2019 14:46:59 -0400 Received: by mail-lj1-f193.google.com with SMTP id v18so6972263ljh.6; Thu, 04 Jul 2019 11:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YsAlp4ULFAEt/KZTRgfVhPSsETI930mXTk+ASwru2g0=; b=Du2gavV9vIL+NiWNjpFjWlWz6iH0UK/3brqTvuQphGXknMO5DsiAZZa8MxmKb0kU5U YWmgI70B0W4W8McXIhRbODaxAbNj/jYaUrDnHk8t27ZIvw9dfb1o4tVujqGbez046BIt mD9vG1ZIhmInvVy5Indnuq1PXqq5tr+RXWdB8uooX7y7KAcDcXy/AkXN0ilpQY3mtA8q XcMq9Hd8tZW3x3VDQhcblFzledgW2dcGkp7ej/kDAcZ15GtgCpKh9zTcyPfvd4ns3XDu p+d3zV+S2QnXYzY/cs6Ho+FIav3Pm537gJ4v3/DnoFTJXro6Myunq0yk/j8tBasKSWdg oldA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YsAlp4ULFAEt/KZTRgfVhPSsETI930mXTk+ASwru2g0=; b=tc7CcFLIUZ/DYOGKPrZ+MiO7TbArZjRofNG5IiQYD6SieWy8F+oA9QMPv8w7BfTZS6 8EEo96xPgjts2M+mLZjqVBvG3Q7vb2bOfGKnjl59w8q7dq711HEzfBGztv7GAdHO0K5O YHiqWdo8o87R9rxDN696GG0FJ8v6Jj4URNthrVjLSpqGNJb29ZQwwnN/I2GlmZlgz7JI z4FOYnJ1Yk3FRqKe254sN0ZxFqLt3iTY4eeZPw4L1Y2ag/saxrbhGM4tP2RlVWlnQ8+i Rv/pb1r/zT0RpM+H5nC5lE14hhjy5dCQK48soHyyAsfKYFCrtKcRzFr3cfLCYNz8/Po2 TMCA== X-Gm-Message-State: APjAAAVrcrJWBfOF3N548tzfGmdtYOo9RWwDmYosfLF2PK1jeh9alzj4 pkF2HOH9de1i0HrRoNLQI39MUUFS3GU5w5dxeKgwVu5T X-Received: by 2002:a2e:a311:: with SMTP id l17mr5687877lje.214.1562266017051; Thu, 04 Jul 2019 11:46:57 -0700 (PDT) MIME-Version: 1.0 References: <20190704170422.GA25633@luke-XPS-13> In-Reply-To: <20190704170422.GA25633@luke-XPS-13> From: Fabio Estevam Date: Thu, 4 Jul 2019 15:46:46 -0300 Message-ID: Subject: Re: [Linux-kernel-mentee, PATCH] media: dvb_frontend.h: Fix shifting signed 32-bit value problem To: Luke Nowakowski-Krijger Cc: Mauro Carvalho Chehab , linux-media , linux-kernel , linux-kernel-mentees@lists.linuxfoundation.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Luke, On Thu, Jul 4, 2019 at 3:22 PM Luke Nowakowski-Krijger wrote: > > Fix DVBFE_ALGO_RECOVERY and DVBFE_ALGO_SEARCH_ERROR to use U cast which > fixes undefined behavior error by certain compilers. > > Signed-off-by: Luke Nowakowski-Krijger > --- > include/media/dvb_frontend.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/media/dvb_frontend.h b/include/media/dvb_frontend.h > index f05cd7b94a2c..472fe5871d94 100644 > --- a/include/media/dvb_frontend.h > +++ b/include/media/dvb_frontend.h > @@ -144,7 +144,7 @@ enum dvbfe_algo { > DVBFE_ALGO_HW = (1 << 0), > DVBFE_ALGO_SW = (1 << 1), > DVBFE_ALGO_CUSTOM = (1 << 2), > - DVBFE_ALGO_RECOVERY = (1 << 31) > + DVBFE_ALGO_RECOVERY = (1U << 31) You could switch all these definitions to use the BIT() macro instead.