Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2786103rdg; Mon, 16 Oct 2023 15:11:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlQCTxk5VDM/AQ5dnQtVi1PiIw56xxBTaa6AXqRs0w1aECGpSPi8zYj+MIi8cBxXJvfBJV X-Received: by 2002:a05:6a00:2d1c:b0:68a:4261:ab7f with SMTP id fa28-20020a056a002d1c00b0068a4261ab7fmr452521pfb.31.1697494291033; Mon, 16 Oct 2023 15:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697494291; cv=none; d=google.com; s=arc-20160816; b=VB707h3u8LZYUrtHuQA0qz1mSJkYU70yFcioGfgY06GMcJh2rVks/bTQDx6sGZA+UK xvoR2N3yQ1hJHsrftypbMfhVpUUtuw81A5cSkiNa5zt3Jn5BQ2u4BmritcL1I0sR9Hy1 RrFX25Pbn3GcqYGC8lkEIbX5ninYLtnJZcFktJaQN9h8v3qI+nFLjym/h2rB/uj1FfNg j7U1jd/zqU/7hbnvPdqm+QVBKFmis9d4B9VhFKQOgHdl/Su0kHG3j0GKe/BdLYdAXKWi B9lpcyIL72c2dlHEK2gq8XZTmOXzWQfuJUueMlo9KNh1XENPazi3grzkNIZxVo5ycCgw MbbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+KYZz68tT2pQ+rcwZ+ZZrsQuiCKis3lTYkCixpU95Zw=; fh=08fziQoVmSodn9BgM73fC6MAuO+lwNcjYQG6/V6syaA=; b=ZP/sIyeZRw6IYr7+wF1apf4MPvTnT8CmabnKrMkum68t9d+9ueVWnNDo8fG/2DByww VfmuX+2zdZPpOgHcKHm0ysrfJCiZ0ApN0J8d7oyBFvYUiuT7/11opetZJaV2PapaCCUi X1y8EflLprFRjjyRPXG37K7/dohRoXMUIudNe846sp1r+J1CgIUhRxPE0XbeVxR1x6tr IGooYN4QBSlORZo0Q2r7tPINKzvW6ekMpY8uzYXBziTfJ/3lUAuNJgnv00zxHnJ1EN50 Mz2BKdMjwzNBBO7L1fsc0Pc9qupYnKIA+kRuxibX/6+DSWdC8MJhPpXLfD2KqJK5kFyp OHTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EsT1VTe+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id d20-20020a056a0024d400b0068ff3a3c9d0si160657pfv.91.2023.10.16.15.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 15:11:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EsT1VTe+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 0049B80B1311; Mon, 16 Oct 2023 15:11:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233997AbjJPWLR (ORCPT + 99 others); Mon, 16 Oct 2023 18:11:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233863AbjJPWLP (ORCPT ); Mon, 16 Oct 2023 18:11:15 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AB92A1 for ; Mon, 16 Oct 2023 15:11:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697494266; x=1729030266; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=uOSGYUIh2bCQLm9WrX2gbSaTh3qGkOYaDbBrkhXMx+E=; b=EsT1VTe+9GsZWYRbiU6wcAamRcTJW+jmyZBTPfpfpDs9VTSSxYW7mq+k /eoYpyZii0cq3+Ml/f+PSd7bzFoVfk8RkwWXIAqwqAyVZSo+ZJazkW0Ca eo2Gzv/UMwyDZ0YeHloTEoHYgyshWSA0PG5gz4NoE8ZBtTEwVwqrKLIa5 H6/gn7PhOsxyiNxwNwHcGPCbkxVGM4MCleZl2AkMHDkLtLGUzRkIPXs76 Xuc7Xgl/v304+X30yxigJ4/9324h2pir9Jkd0RYCIIxpxkSg2UC3bosPf NhomoR77+XH8X7L78DYz8jw5LCh8PvrG/dDO9ZbmrZo0Imofq2zXYsUWG w==; X-IronPort-AV: E=McAfee;i="6600,9927,10865"; a="370723377" X-IronPort-AV: E=Sophos;i="6.03,230,1694761200"; d="scan'208";a="370723377" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2023 15:11:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10865"; a="1087243992" X-IronPort-AV: E=Sophos;i="6.03,230,1694761200"; d="scan'208";a="1087243992" Received: from yckhoo-mobl2.gar.corp.intel.com (HELO intel.com) ([10.215.157.119]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2023 15:10:54 -0700 Date: Tue, 17 Oct 2023 00:10:49 +0200 From: Andi Shyti To: Arnd Bergmann Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Badal Nilawar , Ashutosh Dixit , Arnd Bergmann , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Matt Roper Subject: Re: [Intel-gfx] [PATCH] drm/i915/mtl: avoid stringop-overflow warning Message-ID: References: <20231016201012.1022812-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231016201012.1022812-1-arnd@kernel.org> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 16 Oct 2023 15:11:29 -0700 (PDT) Hi Arnd, > static void rc6_res_reg_init(struct intel_rc6 *rc6) > { > - memset(rc6->res_reg, INVALID_MMIO_REG.reg, sizeof(rc6->res_reg)); This is a complex initialization, indeed... how about just memset(rc6->res_reg, 0, sizeof(rc6->res_reg)); > + i915_reg_t res_reg[INTEL_RC6_RES_MAX] = { > + [0 ... INTEL_RC6_RES_MAX - 1] = INVALID_MMIO_REG, > + }; This is basically a i915_reg_t res_reg[INTEL_RC6_RES_MAX] = { }; Don't know which one is clearer. Andi