From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83CDCC761AF for ; Thu, 23 Mar 2023 16:57:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231969AbjCWQ5n (ORCPT ); Thu, 23 Mar 2023 12:57:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231869AbjCWQ5l (ORCPT ); Thu, 23 Mar 2023 12:57:41 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 532F7B5; Thu, 23 Mar 2023 09:57:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0C982B812A5; Thu, 23 Mar 2023 16:57:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 771A7C433EF; Thu, 23 Mar 2023 16:57:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679590657; bh=mInJnjBlglGuGfIDOgknpNJ8Ke8sxSP3MjH3m6CZZaw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Qx35hCZFUARJfcBigrOo5+QSFYgorxH9byIi96D7oL1W6PwHnhRFcFOLqvgEZfe6N rsPoqz2ojlfCRz6p+LewOsvFAGzCsbkSJVd8C64Eqvr7rqYeKiLg7mwpgcgIN3frSV x4bzsCImaH39c5dxfLYo0J7yavWkJ4ILiGayHVIqDt2vy6MTVApNJuayU52ONBUHdM Kdtq9R0110dXl8qD4JDb8FZ/Vvc1/Lwg6fIg5YxZuFBfu1pLtlbccKMUvwcl/fgvsx 5+BuwFBmuP8SgZsxJv0wjix/umYbK6+Pl0V4jxWBAod7j0JtEQXo5rJ2w38801d3qs ncVoDiXxGCNxw== Date: Thu, 23 Mar 2023 09:57:36 -0700 From: Jakub Kicinski To: Min Li Cc: richardcochran@gmail.com, lee@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Min Li Subject: Re: [PATCH mfd-n 2/2] mfd: rsmu: support 32-bit address space Message-ID: <20230323095736.38ea1ca8@kernel.org> In-Reply-To: References: <20230323161518.14907-1-lnimi@hotmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 23 Mar 2023 12:15:18 -0400 Min Li wrote: > - u8 cmd[256] = {0}; > - u8 rsp[256] = {0}; > + u8 cmd[RSMU_MAX_READ_COUNT + 1] = {0}; > + u8 rsp[RSMU_MAX_READ_COUNT + 1] = {0}; > int ret; > > + if (bytes > RSMU_MAX_READ_COUNT) > + return -EINVAL; Why is defining the constant to MAX_READ and checking the requested size part of this patch, the commit message only talks about addresses operation size is not mentioned in any way...