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 AEE24C4321E for ; Mon, 5 Dec 2022 10:08:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231223AbiLEKIz (ORCPT ); Mon, 5 Dec 2022 05:08:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230036AbiLEKIt (ORCPT ); Mon, 5 Dec 2022 05:08:49 -0500 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87433186E2; Mon, 5 Dec 2022 02:08:46 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id C5432320095C; Mon, 5 Dec 2022 05:08:44 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Mon, 05 Dec 2022 05:08:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1670234924; x=1670321324; bh=0cWFVn6Jt3 0KZzilLG6w+rtzharMgZZo8y/FqB4OzOA=; b=Zv5G1sT9cy0RGrWmakbzz7t8kU bA+vyob5lMX6WCVoyORHcMMUXhde847YKIqEG091niEW6TYOdRjXTf24YMVtVipz XDCW1d4ZYtFc8SSRvZwIo/dUzGtBpTXi2qwBI0t50coDJ0hyEpdAJvGkpg1HkvN7 lHIZZijn4E1ehJsOnCGy6LXbtkZpehJoHaHy4tPPkb1mW12483Q86Fcxd6EPqkaY lq5e8tgA3HiRoUgi4+QUlWug8EOveg8WZZjRjLtLWZSzESKlJWia7l2Z2s1e0Eii qXL5KH6DvaHTNKTi7snIqkoKViNbrszV8ol2+3bXA+xZSlGEYlYq5934Bl6Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1670234924; x=1670321324; bh=0cWFVn6Jt30KZzilLG6w+rtzharM gZZo8y/FqB4OzOA=; b=D/ItRqorHzrPrPzwi2cYbUYcrIqshcxgThxeCJkzEKY+ ONmON1oN0P2WCJRtUSCaIwixWmma3jIiWjrfYD/HR6xIhIQ0LgF2tWmnVP6PCtYf u18t/t4JbjwrbIcerOO2S4zYXABG0wY34sTPhFTb5IbZB0Xt4VtQpPpq3ND5l8Rm X23l5tzCVYYJCkvwuMB2JJsYBzS3bRHlurN6lpUH6bcWRr/T5RWFz2wFx/3q+zsC hgoKNjGdDrRaqM+xpFrxVIbjCPyq3xjwKF+vxowiJ6sZQRaCCTs7FNWlCYnNJFV8 edVBaHO/SgNxBDzP2l9Oc4ApjCsG+UjwqSOaNv77Xw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeggdduvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedtkeet ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh hnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 5DFCBB60089; Mon, 5 Dec 2022 05:08:43 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead Mime-Version: 1.0 Message-Id: <98670e23-6553-4788-8662-9403c480af82@app.fastmail.com> In-Reply-To: <20221205011105.4do4trbytq4bfw5b@mobilestation> References: <7ee4a1bd-0674-42d8-8980-8b029ca09e71@app.fastmail.com> <75eaeab3-7781-d60a-ae61-ae837f5dcec9@opensource.wdc.com> <20221014140633.mlypet7skkxvt453@mobilestation> <20221017155246.zxal2cfehjgaajcu@mobilestation> <20221205011105.4do4trbytq4bfw5b@mobilestation> Date: Mon, 05 Dec 2022 11:08:22 +0100 From: "Arnd Bergmann" To: "Serge Semin" , "Anders Roxell" Cc: "Niklas Cassel" , "Naresh Kamboju" , "Praneeth Bajjuri" , "Serge Semin" , "Damien Le Moal" , "open list" , "Linux ARM" , "regressions@lists.linux.dev" , "open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)" , "lkft-triage@lists.linaro.org" , "Lukas Bulwahn" , "Carlos Hernandez" , "Sumit Semwal" Subject: Re: TI: X15 the connected SSD is not detected on Linux next 20221006 tag Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 5, 2022, at 02:11, Serge Semin wrote: > On Thu, Dec 01, 2022 at 12:48:32PM +0100, Anders Roxell wrote: >> >> for (i = 0; i < hpriv->n_clks; i++) { >> - if (!strcmp(hpriv->clks[i].id, con_id)) >> + if (hpriv->clks && hpriv->clks[i].id && >> + !strcmp(hpriv->clks[i].id, con_id)) >> return hpriv->clks[i].clk; >> } > > Indeed I should have taken into account that devm_clk_bulk_get_all() > can get unnamed clocks too. But checking the hpriv->clks pointer for > being not null is redundant, since the ahci_platform_get_resources() > procedure makes sure that the array is always allocated. At the very > least you shouldn't check the pointer in the loop, but can make sure > that the clks array is available before it. Do you think this is otherwise the correct fix then? Any chance we can still get a version of it into 6.1? Arnd