From patchwork Fri Sep 1 20:41:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 111494 Delivered-To: patch@linaro.org Received: by 10.140.95.112 with SMTP id h103csp1538901qge; Fri, 1 Sep 2017 13:42:08 -0700 (PDT) X-Received: by 10.98.52.67 with SMTP id b64mr3651636pfa.231.1504298528500; Fri, 01 Sep 2017 13:42:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504298528; cv=none; d=google.com; s=arc-20160816; b=s9mME7hPBN7cLl8fEnE54sbmKL3SjvUOFxDyfM4Ubmh0YWdSjzsfS7yNPsfsKRkhHW 2cNvaFczDxr+KsrfyM8rIKY4ffOsPzN65F6ELoDzp+bi/zIy51PoCkyCRIY5aFNXzCYw OzBil1DyqOgnBIQ8NohipUwgNwJsbpXtBNkCPJ3klWp/2pux3RD4OsN/TYudPlbLyEKR 3ccEd+CQxxY0cB1OSxF4bODgCrbX389nLC+HBWzvQcLVsxwTfNnAujQ+r2yaLhbqwlGm ctShNH4/60V8NuJ+EBjA7RCFs4/CTI90vWzepsEzxXru8MDShPfywtXudz5qK9Pt8ffn +k1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=JM3Ni2MUBfVHJA3WNtDUv5p+FE9wMoR9i/udzgy/B38=; b=C912iZFJ5M/t8D4TD9TEuH0vs7iynUZJDe8lbGWrmJhjFrhaKCTm+ALrissD9Qvk8/ nmepTshZevqpqeLkEVRmqAR9fpKhdRe09kD51Dni6tGTIw9Q3LvpTMN6zIKhsKWTNu0+ xNvcYX88g60IJSYBF9DTOe1+o6F37699J1bjWwUvVj8GPxBYmNUHio9+HFdDTVJMB+al L2uCj3my1T+s6PWXxj2gzBy6P+seyA0Gak9FS80+14HOUwvR6YjUhrw8goZVPlm8Ak1y zBloEOX0mTNwq+vZ8rF1Z6E9S5f6x/1NH0XJA7ome3Sfi94dU30gf3dhEzm4+vMO4oMc y7GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dDz18+z/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1si712238plk.562.2017.09.01.13.42.08; Fri, 01 Sep 2017 13:42:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dDz18+z/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752618AbdIAUmG (ORCPT + 26 others); Fri, 1 Sep 2017 16:42:06 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:35844 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752504AbdIAUlZ (ORCPT ); Fri, 1 Sep 2017 16:41:25 -0400 Received: by mail-pf0-f172.google.com with SMTP id r187so3450516pfr.3 for ; Fri, 01 Sep 2017 13:41:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JM3Ni2MUBfVHJA3WNtDUv5p+FE9wMoR9i/udzgy/B38=; b=dDz18+z/r4YvctAOG+Voy2Canogre41YdRjdCKYb7XGCzAhFqkmT4aEIvWXRsrmZWO ToHvKFwwJ1UMfnYj0R0RAuxw5mu+Le2XsgD2X/WOAHHVPBgI2Vam+zQdAoOYR4reqqLr u3IUn/OtRR/OkmJTJFGN1FcqXQQ/tgFIp57KM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JM3Ni2MUBfVHJA3WNtDUv5p+FE9wMoR9i/udzgy/B38=; b=HoQO4TIE4P3TbQ7vxAwYWqO26Is/aWEUr1F3TcKx8MHzLJXi0dYfCdBXSO3muJwpwL zuHfR+Glq0Dk0gHgZT/2lCIeZCzbktZ8cpEr6ciSls4qtiYAex8XhgVQo9n8p9hy4PXD 97gjTWpHOZmuO16qy8n6o6AAivQJGtKIgb2lqoBKjwg2V3Ex+Z8B+xG0Tm1Kd0OPwan7 UxePDIU+FHQDJMI/uPNaCk5IE1Bc4eD7A2xArbGmKZjY56jC/rvM7fSmGCWzvDlwPoQ8 DVeCk+qMWFjgu4yYAnhek+Jo3jxNwCxGWijEzdMBafLncow8uhgjpREZV7df3Gkv+htI tc4g== X-Gm-Message-State: AHPjjUiusmGEH6Dv4gKlufXvvE8pNc76aocL5CfDXErUGzZr18+4KI+A Qct5q6Xuze4+3ie9 X-Google-Smtp-Source: ADKCNb6J3i+7pyUUuM1ricPbHth6YS7muh7tH3koarH4e3wGd7gi0/4NPtorLD7zf/zOgohn+3OOQQ== X-Received: by 10.84.133.15 with SMTP id 15mr3908099plf.74.1504298485297; Fri, 01 Sep 2017 13:41:25 -0700 (PDT) Received: from localhost.localdomain (ip68-111-217-79.sd.sd.cox.net. [68.111.217.79]) by smtp.gmail.com with ESMTPSA id e5sm1279660pgn.57.2017.09.01.13.41.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Sep 2017 13:41:24 -0700 (PDT) From: Bjorn Andersson To: Marcel Holtmann , Gustavo Padovan , Johan Hedberg , "David S. Miller" Cc: linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Loic Poulain Subject: [PATCH 1/2] Bluetooth: make baswap src const Date: Fri, 1 Sep 2017 13:41:17 -0700 Message-Id: <20170901204118.17123-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170901204118.17123-1-bjorn.andersson@linaro.org> References: <20170901204118.17123-1-bjorn.andersson@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Loic Poulain Signed-off-by: Loic Poulain Signed-off-by: Bjorn Andersson --- include/net/bluetooth/bluetooth.h | 2 +- net/bluetooth/lib.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.12.0 diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 01487192f628..020142bb9735 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h @@ -233,7 +233,7 @@ static inline void bacpy(bdaddr_t *dst, const bdaddr_t *src) memcpy(dst, src, sizeof(bdaddr_t)); } -void baswap(bdaddr_t *dst, bdaddr_t *src); +void baswap(bdaddr_t *dst, const bdaddr_t *src); /* Common socket structures and functions */ diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c index aa4cf64e32a6..6048cc07568b 100644 --- a/net/bluetooth/lib.c +++ b/net/bluetooth/lib.c @@ -30,10 +30,10 @@ #include -void baswap(bdaddr_t *dst, bdaddr_t *src) +void baswap(bdaddr_t *dst, const bdaddr_t *src) { + const unsigned char *s = (const unsigned char *)src; unsigned char *d = (unsigned char *) dst; - unsigned char *s = (unsigned char *) src; unsigned int i; for (i = 0; i < 6; i++)