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 0BFA5EB64D7 for ; Wed, 28 Jun 2023 16:22:13 +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-Type: Content-Transfer-Encoding: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=tSpIfToQ5gLvCVzNFRYNaisOVMdR600KCz/5QH/FEQg=; b=xNEaPWXWaiE6RO UTz+yRwj3ClX6bhY1qg6Nw9kQj+o5EMmd7rJxaa3awKmc77OAFZZRziUWOEapLw5JHoc6O+Dfe3hj Dz4+d2zxjUSJtU3Snt7oKfqYOMqdTLU/r/Ymk4Cm1+N656sstknOxeJLIRlyCkugLzacpTHcToLzO Ysjw33I9ofBpgZn4I9DMTTvo3+W8H+jqLGIe3Jyy0t0ERe7wasogbhMvfdrFX9VoPfQzunsfxHoVV z+gI5uswAaswtVu/hBZrjDawa/xXeHSjfWf+PsG0V8Xj9yqlw+XE9KasRoA+HpnxEpCGcL1mkluZB X1OSI6LUmpUWmLjZeUCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qEXvO-00G72H-17; Wed, 28 Jun 2023 16:21:46 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qEXvJ-00G6y8-2N for linux-arm-kernel@lists.infradead.org; Wed, 28 Jun 2023 16:21:44 +0000 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35SD9iJ3001700; Wed, 28 Jun 2023 18:21:14 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=cANbp4lTIZBNTyBSNmcaauw6ZYCKFuy+gZZ75QOuzgo=; b=J2xKykgXCi1cE3T71GEW/fHR4RPb/8j49w4V28i1v0YuvSoTYyhudjvZOexJJxlw2BMw HH5t+0IGtmGK2hPCcUhgmfjCwFP25xNXHrN9ByZKKK6uMxzrl0x4WOdCgGF/4lZqnTU/ 4jRsdxBW4+Jv98tXRUZqSaaHJVuo29u7AeNZc0GSkU2u0QfQXhZNyhvfvB/nALT9p4ST RF09N+r13ndFQOXHRLKcGYAn2RmZCPZkTjEI0dmxK9MMfQoUpBap996H4+CZGGDBG2be /TdkkA4bl/MR9h8Pjn9b0kJ7wovOxnjmBHHJeKHFPrlHE//F52h82fL3+vB1TBuzhEa/ Zw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3rgngn92ad-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Jun 2023 18:21:14 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id BD9D8100057; Wed, 28 Jun 2023 18:21:12 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id A0A0623152C; Wed, 28 Jun 2023 18:21:12 +0200 (CEST) Received: from [10.201.20.168] (10.201.20.168) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 28 Jun 2023 18:21:12 +0200 Message-ID: Date: Wed, 28 Jun 2023 18:21:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2] spi: stm32: disable device mode with st,stm32f4-spi compatible To: Krzysztof Kozlowski , Mark Brown CC: Krzysztof Kozlowski , Alexandre Torgue , Alain Volmat , , , , References: <20230627123906.147029-1-valentin.caron@foss.st.com> <0815474b-a8fa-f486-fc6e-a85df88ed9b9@linaro.org> Content-Language: en-US From: Valentin CARON In-Reply-To: <0815474b-a8fa-f486-fc6e-a85df88ed9b9@linaro.org> X-Originating-IP: [10.201.20.168] X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-28_11,2023-06-27_01,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230628_092142_296276_30F58EE5 X-CRM114-Status: GOOD ( 15.96 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On 6/27/23 15:39, Krzysztof Kozlowski wrote: > On 27/06/2023 14:39, Valentin Caron wrote: >> STM32 SPI driver is not capable to handle device mode with stm32f4 soc. >> Stop probing if this case happens, and print an error with involved >> compatible. >> > ... > >> >> static const struct of_device_id stm32_spi_of_match[] = { >> @@ -1798,8 +1802,16 @@ static int stm32_spi_probe(struct platform_device *pdev) >> struct device_node *np = pdev->dev.of_node; >> bool device_mode; >> int ret; >> + const char *compatible = >> + of_match_device(pdev->dev.driver->of_match_table, &pdev->dev)->compatible; > The goal was to replace it, so drop it. Is is still needed for dev_err, so I can't > dev_err(&pdev->dev, "spi-slave not yet supported with %s\n", compatible); > >> + const struct stm32_spi_cfg *cfg = (const struct stm32_spi_cfg *) > Why do you need the cast? To drop the const? Are you sure it is really > needed? Effectively, this cast is useless, I will drop it. >> + of_device_get_match_data(&pdev->dev); > Best regards, > Krzysztof Thanks, Valentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel