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 4F0BDC0015E for ; Wed, 19 Jul 2023 06:15:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230481AbjGSGPd (ORCPT ); Wed, 19 Jul 2023 02:15:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231128AbjGSGPY (ORCPT ); Wed, 19 Jul 2023 02:15:24 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09B072116 for ; Tue, 18 Jul 2023 23:15:06 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-99342a599e9so907585966b.3 for ; Tue, 18 Jul 2023 23:15:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689747302; x=1692339302; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=QMvfRl+bFLnpDnr5W6RMYDLuRVuKpZRmCG+6llzz95M=; b=VLTH+DOnshchuB2xlx/FFJgRWxt/YD2QgTnB0I1yKYULYkkhwdFJDLCIxORtuad49n k9BU7OTaFXzCOlBQlCzUi4pkjcMk/TiLheks4ICpbHTyzEPC1HDAeChcn1Ua3aWJ4HzW MjrqEg6y0cfbFoYhseMFk5lFfkK8ckfXaSLHOIA/p63zGbIMQX3wcVvE10fYWpwnFI+M NCLnIGlMZr40VAHZf3B1ma+wC3NGRQNpkWScRUXpqF9jtxv9Zl3+CaA68q8I42Y8XLcG A8EkQmM1lMfQ+P2OHodMKG1TKW4H1VZJTIJpZih1B6Z4rA0yXbKD1ssk1VEvDcwCY6KK IBOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689747302; x=1692339302; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QMvfRl+bFLnpDnr5W6RMYDLuRVuKpZRmCG+6llzz95M=; b=Zb882wGQBysQ5aNaT5ZdQz1El4+swwBb0Nb6M8VtAbIYD0A3VCNMFijSLEoZFStv7g iFQ9tXWKil27cCH16N7QdHhPlFPcb5u+0ToF+KWECtHvIkypJkuyEW2F1lz+LBQ05YwU UcP4qBNTUp8T6psJuYb5cc7UfPzkEJnrqhrA8qLqMkojWVGsbysRRcFeEtA8aHEZZlK7 WyMppnkU7BRAd0dVlYug3pFqKVWfT6Ec3W7gUL5orzWGDW/hj14xK9wFV5hKKK7VucJc /2KcQjmmkluAsUk1X9ZaSmYCJ1YdrtPzABxKvuJTpUl7vcFNMpEK6INutRMlsax8c7CE xwyg== X-Gm-Message-State: ABy/qLavseU/HnCuQp/6sf5xF6gTiExzgOLwN5JS7kpqbTdNZ3hQGjQR rOgGHD0/rXTKW0JliuxdqY9DYQ== X-Google-Smtp-Source: APBJJlGRZZZmnc820slF8HKlmYeUENYJ9xkHTkllvLchrlFNSUlR/DU+Ey8nLunz22xs2vX6ELok7g== X-Received: by 2002:a17:906:5303:b0:992:6064:f32b with SMTP id h3-20020a170906530300b009926064f32bmr1240291ejo.46.1689747302125; Tue, 18 Jul 2023 23:15:02 -0700 (PDT) Received: from [192.168.1.20] ([178.197.223.104]) by smtp.gmail.com with ESMTPSA id b10-20020a1709065e4a00b00992d122af63sm1858050eju.89.2023.07.18.23.15.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jul 2023 23:15:01 -0700 (PDT) Message-ID: <6faf3d1d-f05f-4d28-82d9-32c8e22fd29b@linaro.org> Date: Wed, 19 Jul 2023 08:15:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 2/2] firmware: arm_scmi: Add qcom hvc/shmem transport To: Nikunj Kela , sudeep.holla@arm.com Cc: cristian.marussi@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org References: <20230718160833.36397-1-quic_nkela@quicinc.com> <20230718160833.36397-3-quic_nkela@quicinc.com> <3ae2d618-490a-06da-b4b6-b5a24b0a9747@quicinc.com> Content-Language: en-US From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 18/07/2023 23:16, Nikunj Kela wrote: > > On 7/18/2023 11:42 AM, Krzysztof Kozlowski wrote: >> On 18/07/2023 20:25, Nikunj Kela wrote: >>>>> + >>>>> + scmi_info = devm_kzalloc(dev, sizeof(*scmi_info), GFP_KERNEL); >>>>> + if (!scmi_info) >>>>> + return -ENOMEM; >>>>> + >>>>> + np = of_parse_phandle(cdev->of_node, "shmem", 0); >>>>> + if (!of_device_is_compatible(np, "arm,scmi-shmem")) >>>> You leak here reference. >>> Wouldn't the devm_* API take care of that implicitly? It is same in >>> smc.c as well. >> Thanks for bringing my attention to this. I sent a fix for smc.c. Fix >> your patch as well, please. > Thanks, I thought you were referring to kzalloc cleanup. Will include > this fix. BTW, you may need to fix mailbox.c as well. Indeed, thanks. Best regards, Krzysztof