Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp992167pxp; Wed, 16 Mar 2022 23:44:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzghvEmR6qjv2Q0k584cZuYgMjMi3Frst5yrPoo2t0fAKq+M39IKL73siayajvqEfu+25Dw X-Received: by 2002:a05:6a00:2131:b0:4f7:b6da:9ed0 with SMTP id n17-20020a056a00213100b004f7b6da9ed0mr3317773pfj.69.1647499474889; Wed, 16 Mar 2022 23:44:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647499474; cv=none; d=google.com; s=arc-20160816; b=Fsf9TpKIy0YvF+wu3LnunHIyd/luNAnvd1l7W8vH3UGx4Rj7E13lLGpMTaSAqLH315 zF1u833+8U9kPMkYBeYk73qSq7eXlWCGhKjTa7gA3IhrKkRhqSYbZCl+kueJZYsRVAL/ PuEd411UenP7KerRSwxbc1bhtjcT1GA4HGKGm6DmkcrPfL8G2QUHMEUjrdR4ZaUfGAs3 mPOH4MmbVbeycy16fMyDbWoLoZWeMjhmoGljMrZmLJa7VL7UXfOSi/gTzx0S7xlB3162 qqGvQCQPcQrqa9/Jjxo2giiARBld+GSsm+NmTw+ZX5EbZC0Xlgf2mf8IF5h8U95wWvxM P9Mg== 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=SBAzt8dRC9FCgVBfhj0uCkDtQniTLpYEva1sB4J5Jx8=; b=lA5WuM7A+d97sBZPzr/Nv6EaFZVTeYhqUgg/C4Mb4YfbKZqNl4NzrIKkma6pM+Fif1 3oRoZfvKg/Yb46Fk7HXm5YKDtwpam8Y3/ISNDTVE35CZRAtHmcb0aCZ/1hKToCXMoZur Ggz4tALzS4IjuQLJTRjhvz1Dz0EuiCf3aifp1z8Q+TceSmwVytO8HRNAKNEWObD8mEYV LQRXzE07irGaZWulKxOc/i+CgUm/JuHPUkcErCWlkRu6xB9+EG5hEBHu+I05SBGbh45v MjlyC99sV/2kHqyBGO5B1DXSovbLgK6l9Rs/bcEqcolvlqXKj6c5HZQXKVua7NZFGSKh P+7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n4YfrMJd; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s73-20020a63774c000000b003816043f04asi1226680pgc.575.2022.03.16.23.44.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 23:44:34 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n4YfrMJd; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5DE9B1EC607; Wed, 16 Mar 2022 22:29:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348738AbiCPQ2G (ORCPT + 99 others); Wed, 16 Mar 2022 12:28:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236791AbiCPQ2E (ORCPT ); Wed, 16 Mar 2022 12:28:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B97116BDDA; Wed, 16 Mar 2022 09:26:49 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 5C5F961777; Wed, 16 Mar 2022 16:26:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85946C340E9; Wed, 16 Mar 2022 16:26:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647448008; bh=2nnKMfOwy60kOx/dFCU2LdQ34r1p3osdvyviEMynWTI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=n4YfrMJd77X25AWiIN5jRctkMf5lHY8cb9isdVd0prFcRRjfSqMQ6jWDQpygQ08qr PjgTgeecv2IVOTmqFBuA/MCP0j/5PlWaq7qy+qrqkvbUkJbiwSMf91GgnHBtf4/R+S ST93Pl/1ScspNnONPY4BkUks4iX+Xu8tWCSeFV1a0ByR7M2vpI/LxiJgadG2bb3t2X hqqYJCMBcWd8t9QLAK+3+KsEGtl2ukfx2T85ZwD+d/hHeZH4qx1asN+87G++vcbcDu dn2NdI1MHVqd5nSf9HwX56XjqkDerlvaoNgbyAgxMKVojkMEV2gY8E06sYsxy2nlwB ahUErQ4X0nIfQ== Date: Wed, 16 Mar 2022 16:26:44 +0000 From: Mark Brown To: Geert Uytterhoeven Cc: Linus Torvalds , linux-spi , Linux Kernel Mailing List , Biju Das Subject: Re: [GIT PULL] SPI fixes for v5.17-rc7 Message-ID: References: <20220310121327.63C6FC340E8@smtp.kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SsEmDHQKnJRn53dV" Content-Disposition: inline In-Reply-To: X-Cookie: Androphobia: X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 --SsEmDHQKnJRn53dV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 15, 2022 at 07:56:13PM +0100, Geert Uytterhoeven wrote: > You're absolutely right. So the code should be changed to: >=20 > if (vmalloced_buf || kmap_buf) { > - desc_len =3D min_t(unsigned int, max_seg_size, PAGE_SIZE= ); > + desc_len =3D min_t(unsigned long, max_seg_size, PAGE_SIZE= ); > sgs =3D DIV_ROUND_UP(len + offset_in_page(buf), desc_len); > } else if (virt_addr_valid(buf)) { > - desc_len =3D min_t(unsigned int, max_seg_size, ctlr->max_= dma_len); > + desc_len =3D min_t(size_t, max_seg_size, ctlr->max_dma_le= n); > sgs =3D DIV_ROUND_UP(len, desc_len); > } else { > return -EINVAL; > } Can you send a patch please? --SsEmDHQKnJRn53dV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmIyD8MACgkQJNaLcl1U h9AzpQf+LnSWYHu2jiVKTMWxaK4MuIrtWbY4TF5hm0iG1/NQIuLeAWLNGmw7BbJ0 m/SVbtXjMBH5RGGo3NJiFfIN6OWxRA72VtBvdnJEXhwHbBBnz4C79i3IHWHvH6Kv qfjfKNXhJjGc9qZH44SjB2fAtV3UiqrmfK0TPCbWcr80bjuVJN0xWv7zbOwuxof+ 6CBtqECgNIn487PRfCal4+vtT74YvbiG72h8gKGyGmV2KG7AGSKvf/bAhv558Npu taL/ZE0m10dt4q5pNR0BHH4E1RaZmJUMxfQ3/9qs3gmnp8zbE7EO8yb2oe9vMa4f 9YiivPW922behRiGkQbrtvhUNrq2DQ== =rKFJ -----END PGP SIGNATURE----- --SsEmDHQKnJRn53dV--