Message ID | 20240703083046.95811-1-krzysztof.kozlowski@linaro.org (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | d99b680b4a9a33d0c47a68a4c1a45775023426ff |
Headers | show |
Series | firmware: qcom: tzmem: simplify returning pointer without cleanup | expand |
On Wed, Jul 3, 2024 at 10:31 AM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > Use 'return_ptr' helper for returning a pointer without cleanup for > shorter code. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > drivers/firmware/qcom/qcom_tzmem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/firmware/qcom/qcom_tzmem.c b/drivers/firmware/qcom/qcom_tzmem.c > index 5d526753183d..ab156ab3a6b4 100644 > --- a/drivers/firmware/qcom/qcom_tzmem.c > +++ b/drivers/firmware/qcom/qcom_tzmem.c > @@ -242,7 +242,7 @@ qcom_tzmem_pool_new(const struct qcom_tzmem_pool_config *config) > } > } > > - return no_free_ptr(pool); > + return_ptr(pool); > } > EXPORT_SYMBOL_GPL(qcom_tzmem_pool_new); > > -- > 2.43.0 > > I'm not a big fan of this one. Same with any macro affecting flow control statements. But since it's there and the patch is not wrong: Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Wed, 03 Jul 2024 10:30:46 +0200, Krzysztof Kozlowski wrote: > Use 'return_ptr' helper for returning a pointer without cleanup for > shorter code. > > Applied, thanks! [1/1] firmware: qcom: tzmem: simplify returning pointer without cleanup commit: d99b680b4a9a33d0c47a68a4c1a45775023426ff Best regards,
diff --git a/drivers/firmware/qcom/qcom_tzmem.c b/drivers/firmware/qcom/qcom_tzmem.c index 5d526753183d..ab156ab3a6b4 100644 --- a/drivers/firmware/qcom/qcom_tzmem.c +++ b/drivers/firmware/qcom/qcom_tzmem.c @@ -242,7 +242,7 @@ qcom_tzmem_pool_new(const struct qcom_tzmem_pool_config *config) } } - return no_free_ptr(pool); + return_ptr(pool); } EXPORT_SYMBOL_GPL(qcom_tzmem_pool_new);
Use 'return_ptr' helper for returning a pointer without cleanup for shorter code. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- drivers/firmware/qcom/qcom_tzmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)