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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE84CC31E40 for ; Thu, 15 Aug 2019 06:47:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 865F6208C2 for ; Thu, 15 Aug 2019 06:47:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730451AbfHOGra (ORCPT ); Thu, 15 Aug 2019 02:47:30 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:49406 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbfHOGra (ORCPT ); Thu, 15 Aug 2019 02:47:30 -0400 Received: from marcel-macbook.fritz.box (p4FEFC580.dip0.t-ipconnect.de [79.239.197.128]) by mail.holtmann.org (Postfix) with ESMTPSA id 1382CCED13; Thu, 15 Aug 2019 08:56:10 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH] Bluetooth: hci_qca: Make structure qca_proto constant From: Marcel Holtmann In-Reply-To: <20190815055149.1062-1-nishkadg.linux@gmail.com> Date: Thu, 15 Aug 2019 08:47:27 +0200 Cc: Johan Hedberg , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: References: <20190815055149.1062-1-nishkadg.linux@gmail.com> To: Nishka Dasgupta X-Mailer: Apple Mail (2.3445.104.11) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Nishka, > Static structure qca_proto, of type hci_uart_proto, is used four times: > as the last argument in function hci_uart_register_device(), and as the > only argument to functions hci_uart_register_proto() and > hci_uart_unregister_proto(). In all three of these functions, the > parameter corresponding to qca_proto is declared as constant. Therefore, > make qca_proto itself constant as well in order to protect it from > unintended modification. > Issue found with Coccinelle. > > Signed-off-by: Nishka Dasgupta > --- > drivers/bluetooth/hci_qca.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) patch has been applied to bluetooth-next tree. Regards Marcel