From patchwork Wed May 3 07:53:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 89610 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1152212vqo; Wed, 3 May 2023 01:03:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7mC7Aj75rmU7sXId6ntZc3PdDar+amWq4BhJppyofzedc2VOJ/fuF5doKlWS8eUu4b21dz X-Received: by 2002:a17:902:da89:b0:19d:138b:7c4a with SMTP id j9-20020a170902da8900b0019d138b7c4amr1700733plx.3.1683101022678; Wed, 03 May 2023 01:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683101022; cv=none; d=google.com; s=arc-20160816; b=RN62Zs4ek3hWPLDoX8KQuMjUMZJsko0fKlCIC6fT39EJk4HppqFbAyKG38TC63OdaT 8IUw/VNIZyKfRadwcfGy+m+46zWP4eQOAqOMgrN7tlM01fQtn4VCVHzNP7SDFi1EQApL n4ZRrrQR4TI33BD6wIjRc11PDDS0LRsLJuU7l/0a7q5GOTtopja8Rs/ZY582oZGUxjWP kP5HVI/UGoNo+ajwK7Q/BQ0KdLyAflRhwklgKdO+G/6Zpi64agAtV4e7xMc6iyxzS2bp TJ4NqzHlV9ZGqGk9Qxp0HmY6EX/CPOY1TlIMhdZc5ZoX5WnAO3aWjCDJsAt2or+ZHRuT r6/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=wLmnpSio5vQ/EjDA+3lL/g42L7mPofPw3du+/1V3GRA=; b=KIQgLX8+fc4QZiBxdcvUx1acsl2frFrijOmYiJZgdr7NT6kAbbbFYsCSnSOfTXKYRr I9w6GujlT6+8hLNeiJ94R/Bf0kLbZvRCzmABKut5bv1gM9BaSfY5J9TT5e+eSwxwU+LF cePbahexyTBL2Nzx2rXCl21IlwdrOZYU02dtSOeziZx4AuClm7SvkrjIVNNsO8f0bMAz nKEgx4qi6YOu8FGr5stRPDpmthAu42rCOC1teIKyYmG1SiOw1cm0YESmlmDn0aQzodHx hxtf9rCfA2a4V8v66jZsFtwHjFH2LBFa3JYhqGxNODem+IpHafM3bqfWrllJPE+5lIwF lIrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=mIBzN4ZI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a170902da8700b001a686b1dc64si35128152plx.412.2023.05.03.01.03.29; Wed, 03 May 2023 01:03:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=mIBzN4ZI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229659AbjECHyd (ORCPT + 99 others); Wed, 3 May 2023 03:54:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229767AbjECHyR (ORCPT ); Wed, 3 May 2023 03:54:17 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 569F33C29; Wed, 3 May 2023 00:54:16 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-50be17a1eceso1411219a12.2; Wed, 03 May 2023 00:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683100455; x=1685692455; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=wLmnpSio5vQ/EjDA+3lL/g42L7mPofPw3du+/1V3GRA=; b=mIBzN4ZIAx7HPJqQiAyClDVA/HOCx83EqaqYx+sdN4d+Fp52SbCzYEcYtX1TguFL35 AJ21+5v2y9q5PFnJN1Bdw0IlXl6majlUtlw7eDfgl9HKY5oghtQnZP0WEfEW2n0xW0Jd W+Dh67lnwjLL+mYtVOs1CJqZZq8+wRKDyuEFDsHW/wNwnMorP4n3XNicuLH1fgecifjG ao/gVRcGaGuZiuq0nOWh+8+nP5e53LN/tCMxOAwo22RdH4mvttz+T69uL23cHJFue/Np lQZzuga2+vHyt+6hSzCKGLMKlVqzjdWOEYg5xzJufE/nFQED62qcGfV5b9ydWNemZ3bv Z2tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683100455; x=1685692455; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wLmnpSio5vQ/EjDA+3lL/g42L7mPofPw3du+/1V3GRA=; b=X8xYsX//FLL4nbMwp6HVamrliXlRXlQ2O5dJuxE9rXdwnIkfAnCFw7766wrfMqZ1EZ 7FC9LjKsj8JPapbvLz2z4lT+z+nwu/AY3UDRS7y3h1x36DIfIsxN0wpraombBv2OSqmN cVH05SQcLNLpC+zRG9XUBURoA1CNWqA3N+XNJJo1hJW0+IP6cEfULQ3Zqp4wvhQF3Yh8 oXDNWF6qjta5tOolxMUYWM2nasrscvHMVHDH3jSyvoKlOTC5op1Pw1d8B9YE7yGFvveB LM6TcnC1fzhRnT3J0AZKV7VDWZgSkfLLKYropP8LeQMEo2h5mdDyJyC7JBz6sE7nlkkq VjAA== X-Gm-Message-State: AC+VfDx44LHaRhfKI+B6W6rwQdHA2zmkVE/TDgmX/TozWOWc8r0lUWCO ThJXMtJTf+4Gxu5U9bOlqEs= X-Received: by 2002:a17:907:31c4:b0:94f:e00:c8c9 with SMTP id xf4-20020a17090731c400b0094f0e00c8c9mr1765803ejb.34.1683100454508; Wed, 03 May 2023 00:54:14 -0700 (PDT) Received: from localhost.localdomain ([95.183.227.33]) by smtp.gmail.com with ESMTPSA id ku15-20020a170907788f00b009571293d6acsm15815339ejc.59.2023.05.03.00.54.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 00:54:14 -0700 (PDT) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Robert Foss , Todor Tomov , "Bryan O'Donoghue" , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab , Tomi Valkeinen , Sakari Ailus , Shuah Khan , Lad Prabhakar , Laurent Pinchart Cc: Yassine Oudjana , Yassine Oudjana , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: camss: camss-video: Don't zero subdev format again after initialization Date: Wed, 3 May 2023 10:53:40 +0300 Message-Id: <20230503075340.45755-1-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764859337501820799?= X-GMAIL-MSGID: =?utf-8?q?1764859337501820799?= From: Yassine Oudjana In an earlier commit, setting the which field of the subdev format struct in video_get_subdev_format was moved to a designated initializer that also zeroes all other fields. However, the memset call that was zeroing the fields earlier was left in place, causing the which field to be cleared after being set in the initializer. Remove the memset call from video_get_subdev_format to avoid clearing the initialized which field. Fixes: ecefa105cc44 ("media: Zero-initialize all structures passed to subdev pad operations") Signed-off-by: Yassine Oudjana Acked-by: Bryan O'Donoghue Tested-by: Andrey Konovalov Reviewed-by: Laurent Pinchart --- drivers/media/platform/qcom/camss/camss-video.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/platform/qcom/camss/camss-video.c b/drivers/media/platform/qcom/camss/camss-video.c index 898f32177b12..8640db306026 100644 --- a/drivers/media/platform/qcom/camss/camss-video.c +++ b/drivers/media/platform/qcom/camss/camss-video.c @@ -353,7 +353,6 @@ static int video_get_subdev_format(struct camss_video *video, if (subdev == NULL) return -EPIPE; - memset(&fmt, 0, sizeof(fmt)); fmt.pad = pad; ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt);