Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7923608rwl; Thu, 23 Mar 2023 10:15:30 -0700 (PDT) X-Google-Smtp-Source: AK7set9G3KZREuOK922GG8cOzIqJtibfjiL5MACkPd7QKztD2JffY1xwDixBsN23oIvkS1VR78Or X-Received: by 2002:a17:907:969e:b0:8b1:3a23:8ec7 with SMTP id hd30-20020a170907969e00b008b13a238ec7mr13214567ejc.43.1679591729872; Thu, 23 Mar 2023 10:15:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679591729; cv=none; d=google.com; s=arc-20160816; b=xBi1T0EkJ9V9T+eLbecYFNoWo2hcLeH6wm2KlDpJ9bTqhofJ5ZzAI4aNjT4BwcSRf9 ar+Aa4MEHtbunci1Wr8H2T5JYOlOoC4U6xhu0svAZ5bQjiXohD3mD/ZDiOwVjTpNBBit aLPDJXuNIj0dnl44YRLjf5D4gEQ5Srlb0etVuSl9aJ5HBRLnWtQlI/gRdohWiuVPt1CB 9MD5RNTGy7NoQ+DsG3eRsT0bmzWDgdeys03TRxfEU5qyMQ4Dv88j3Ms6axhMwv4dKfA6 PrsTURUCDNcKZIo//DL8ZteTSOPmHLYuEiUBuAO9mVVBrPozBlo/NB9m/pdporILeWEK ONkg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=wyGKBWm0D9qLXTbalXnTYGiIKWM8o3bRXsadcm99ksI=; b=rtmoVtGTvMYATKhL1eLDAMvoCwZe5au6qs/UD9hOuAX7wQTzcDOvsjW9vm6EG8K+91 6PFOG2rlOs7ecj1yvTaAx9ltqWBVXLgdO5N+NMYBMkbWwsQI7F+KdLrwWApSGZ4rTesl OhFmhPuDnF3pvqk5AbxTa9AasnRPo481t0cazdp3vBxOmEzBejn1i9rrUGrwVlGOT7Q9 w/dzBr2SaWAHPlAjtODJV+brz/dadyROhgdVaD2L3SBoQm8S0b/zIKnUGEyVLCix9lRs LaJ1UoxBBCpfkA+IIECWTuLgHPMLW1Zobvp7PvwE5Fx6BjDgNZ+zzmoBzPVRlBwhjowR +iaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qx35hCZF; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u23-20020a170906655700b00909485d4541si17550422ejn.263.2023.03.23.10.15.01; Thu, 23 Mar 2023 10:15:29 -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=@kernel.org header.s=k20201202 header.b=Qx35hCZF; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232141AbjCWQ5n (ORCPT + 99 others); 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 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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...