From patchwork Wed Feb 21 23:13:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10234339 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B053160385 for ; Wed, 21 Feb 2018 23:13:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A313828567 for ; Wed, 21 Feb 2018 23:13:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 97D01285B7; Wed, 21 Feb 2018 23:13:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4682E28567 for ; Wed, 21 Feb 2018 23:13:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751357AbeBUXNv (ORCPT ); Wed, 21 Feb 2018 18:13:51 -0500 Received: from mail-qk0-f193.google.com ([209.85.220.193]:32807 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750842AbeBUXNu (ORCPT ); Wed, 21 Feb 2018 18:13:50 -0500 Received: by mail-qk0-f193.google.com with SMTP id f25so4261386qkm.0 for ; Wed, 21 Feb 2018 15:13:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QAXAWiiYE4eVbD8zgMYqutU5z5Mdfns8H0QJQA5E+kI=; b=pABKWTGNimGRzROBTiT6qEDG0Mbx1OkGsrWUj/YZgXcFj8BnhbahbGldctVbABQ+V1 +ywnmOQoMl44hJKozvf2Jluka7y54/YFg6ug8vN2et5zYBl3z9KCy5tELWcMl+axi/m6 aIjjCapw/daHvREPy9JFJnGRTDgyrO5ZHRpadTtc99okGvjjJNvI6gYLaowX7fmeOlPI 2Ly4d25lBB3DhhLTpzcdwyR6XHpJgh2RZmrKT1EL02AwpU972HCw8Yqz5zM4dy27f1oy q+ctNxhySw18OnUXMjXDvY3SfpM2qVnvj653Z05QIva3HMIpIg9qiFZx41YqMtTMDY/t sv/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QAXAWiiYE4eVbD8zgMYqutU5z5Mdfns8H0QJQA5E+kI=; b=KTKfjUm1wZX7SoDfY6rZbS041yKJemFaDnsp0bIAN9Sf+F3/6XZ7hvX9vtHyN3nMQx Ad1kR6X+psgkg1RLRaG7pQvhS1a3OpI2pxKZV69kUiPn1eQdsCnkmHWgpy1Qu9Eg0Ulh OZMOUcMtHT/bHK5pjv0Dlrpvxcj3ulX67BTkG2ZT1Pr81BqNyf5vIk64OHDyDwEdCNV+ eimLp5I2EjN5aVtq4TFXrJF+c4DiITOwZkNRCOL24rV7G+gJGiKKMYI4mDMjxi7jQMVs AVGxocsiNzs2n5DVxeYCTJf0XwCxTCs50bHU6VELSWboT4Ihaoy4Mzlk2HC6wkm7p/eN n+hA== X-Gm-Message-State: APf1xPBkk3gDMmE9vfT2VZr+t0GWg5Oc5Wh5Zq1AeJHEv981zvURbXJj 6+kpS+jmfNfPR/TP760YwFM= X-Google-Smtp-Source: AG47ELvZOPvlqpntLJwidXe4SSGE56aGVLaumAjSEEhrx4zburNZ/zHPdYeyjJ6W68Or7TpP11A5Aw== X-Received: by 10.55.79.78 with SMTP id d75mr7425381qkb.20.1519254829868; Wed, 21 Feb 2018 15:13:49 -0800 (PST) Received: from localhost.localdomain ([2804:14c:482:a5e:d81f:f7db:5766:3221]) by smtp.gmail.com with ESMTPSA id h29sm13022436qtk.94.2018.02.21.15.13.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Feb 2018 15:13:49 -0800 (PST) From: Fabio Estevam To: p.zabel@pengutronix.de Cc: slongerbeam@gmail.com, ian.arkver.dev@gmail.com, linux-media@vger.kernel.org, Fabio Estevam Subject: [PATCH v3 2/2] media: imx-ic-prpencvf: Use empty initializer Date: Wed, 21 Feb 2018 20:13:51 -0300 Message-Id: <1519254831-14452-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519254831-14452-1-git-send-email-festevam@gmail.com> References: <1519254831-14452-1-git-send-email-festevam@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam {0} explicitly assigns 0 to the first member of the structure. Even though the first member of the v4l2_subdev_format structure is of _u32 type, make the initialization more robust by using the empty initializer. This way in case someday the struct is changed so that the first member becomes a pointer, we will not have sparse warnings. Reported-by: Steve Longerbeam Signed-off-by: Fabio Estevam --- Changes since v1: - Improve commit log drivers/staging/media/imx/imx-ic-prpencvf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c b/drivers/staging/media/imx/imx-ic-prpencvf.c index 143038c..60f392a 100644 --- a/drivers/staging/media/imx/imx-ic-prpencvf.c +++ b/drivers/staging/media/imx/imx-ic-prpencvf.c @@ -923,7 +923,7 @@ static int prp_enum_frame_size(struct v4l2_subdev *sd, struct v4l2_subdev_frame_size_enum *fse) { struct prp_priv *priv = sd_to_priv(sd); - struct v4l2_subdev_format format = {0}; + struct v4l2_subdev_format format = {}; const struct imx_media_pixfmt *cc; int ret = 0;