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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9DFB5C4321E for ; Mon, 5 Dec 2022 13:25:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FVAQRnSx3la2+UTEvciLTWQNpi4ORbDdISCjsM/63DA=; b=Lqv3ZkWQkkc41x 8gfYTXzY/GLfAOfo9djEBmijS4mgmESM4LeZgKW3D5MU8Tb33xrb4j6T3tWapuFBl4YHNmWcM82I3 cxnbDTyIU6qEZ0bh5OicpnkqgAGpP35nwot3tPdQIUG0wnT1jZ3TG2NQLQqMzBpPveiBIcuIN4SSs 3B0KJlnqijY/jWeP/Z6L3SBrjO4/hE1OfmGk190K25IOpCgrbU7WM5UVtF5wyHjgyzCmoAxAQJPqG 8cPmdOyv9rLLP1oZF2XGJ88W/OtV7eCVXLTqWrw7CB6Id6jKOut3ICNoGXLFTdGRcBJusCz8bQ3VH WuS76E3mrTO45+/E0Zag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2BSU-003Noo-KX; Mon, 05 Dec 2022 13:24:34 +0000 Received: from esa1.hgst.iphmx.com ([68.232.141.245]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2BSQ-003Nd3-U2 for linux-arm-kernel@lists.infradead.org; Mon, 05 Dec 2022 13:24:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1670246670; x=1701782670; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=eIuVPi2oKlmfmwkWcq2jyJdIlCtdykKp0CE/vjbqIHc=; b=qFQvuAM9Ye2KJtBvtiV5rv0NovY+Yp4KBbww4UdijzRQKF1+/8Mi9spR XjN2vGD6JO6+wNGmNnxODUz2Xfart3c1q9yzlxDF+twH3dVQANKQi5lb4 sSZ4wZKnUDuQ1HOVs0hokdMBU2S+v3MPsISC/wM5+mA2E8J/bJpZFm+cm xDT7F4f6IWxwr9amFR2bsdFbFCZsuiezOqRQPs+8L4TqLxt297dVnBdc3 GcN1zfJd1Mj8Bgb/Jk80FtJEgVKaSQLAf26jhHodI+4qgHuNzxNF9wwbA yjIqQ/lAVgmuZvdZ0eT5CPoT6XvWGcD8UPI79nt45qEhrqfN0Sn+XWGuF A==; X-IronPort-AV: E=Sophos;i="5.96,219,1665417600"; d="scan'208";a="330012930" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 05 Dec 2022 21:24:27 +0800 IronPort-SDR: snJo0gQVtNtnU14txk37Qu5Bm0d2oeAleyVEMBjESCveMPiUklJnEkEDiPul2smQHg3MJMisu5 nl+SpJSd9ewDyJ5N4kvaT5jVRuhNMSP4yyZwaPsIuyCC55NJGCfEp6TdS4+5iTDlxPcG77naA8 WF2JL3zCmkF9ztqdU1rTfNildhAFKVZclTLYigebxJFnqRl7d5XWT4kGfcKHFInGszRGNOlWJ0 SDz2sHeGuKtDd/gHErqaNSDCLrqeo0Kgx55IV+Ivg+rs3mheCkz33dRhEdtZQg+QHDYPeeI4CM Efs= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 05 Dec 2022 04:37:16 -0800 IronPort-SDR: JK7aZg1hsaHyy7tEFxGl7RJO1AFoqwP5fvbQEkR2uioNbMEyO4qaQSpafxVo5TwPyV0R9wOSjv X9VGITHLOAG/Y03286qBXCW5wTDI/SaqKIZDMzNC2UNsysAazgumzO2PF+A7l2K9kpYIpIgAjA suCF/eaCE96ZHg1UGp6hnhtgP4A4QH1geaJau+o0I9L31YRRbqwf+HmJhIco65QeSo3r6Xmdwa wbRcAWMYo2efRLwkZXsbCOmkTgaKWsACNyD6dhXQO7x3rAUdlE7B6qFwqzThSuDOwCJ3XhrYHN ZhI= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 05 Dec 2022 05:24:27 -0800 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4NQkmC0l5Pz1RwtC for ; Mon, 5 Dec 2022 05:24:27 -0800 (PST) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1670246666; x=1672838667; bh=eIuVPi2oKlmfmwkWcq2jyJdIlCtdykKp0CE /vjbqIHc=; b=Ecs0n0q1JF4Cx8NoxRMgMJtMXrKuW5Q0cv0SaH2nQVL9z4d2Ksw oXbrqsUEPpNvntcx7VwaNyBirMaNJS7u6cxvS+6r6SdY0IDZvFdaEnJskr7PVtWr gHK5ubpd82Muow3h6emPVVyTAINaxclwgIQalI/+3b57j4xK9Q0+jsckqpd4Ii1H +BDqqFFoSkq6T41xsJpOp2mBPDUGNPTws4LYze04nhIRaWGPAIswyb8xC0qSMLq7 rnpIGvaYv4IYho1sv5tWhQyD6SEuRMgvGW1FKEtCwC+pID4Zkc0A6gfv0I+pxHvK Nn8gTg7NPDm23gcFTGFUnNHWvjrxAbt/esA== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id lAPPoRX-8Ehl for ; Mon, 5 Dec 2022 05:24:26 -0800 (PST) Received: from [10.225.163.74] (unknown [10.225.163.74]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4NQkm75kCwz1RvLy; Mon, 5 Dec 2022 05:24:23 -0800 (PST) Message-ID: Date: Mon, 5 Dec 2022 22:24:22 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: TI: X15 the connected SSD is not detected on Linux next 20221006 tag Content-Language: en-US To: Arnd Bergmann , Serge Semin , Anders Roxell Cc: Niklas Cassel , Naresh Kamboju , Praneeth Bajjuri , Serge Semin , 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 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> <98670e23-6553-4788-8662-9403c480af82@app.fastmail.com> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <98670e23-6553-4788-8662-9403c480af82@app.fastmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221205_052431_059475_E130B32F X-CRM114-Status: GOOD ( 19.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 12/5/22 19:08, Arnd Bergmann wrote: > 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? If someone sends me a proper patch to apply, I can send a last PR for 6.1 to Linus before week end. > > Arnd -- Damien Le Moal Western Digital Research _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel