Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760750AbbBIKpy (ORCPT ); Mon, 9 Feb 2015 05:45:54 -0500 Received: from smtp-out6.electric.net ([192.162.217.186]:59466 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759681AbbBIKpv convert rfc822-to-8bit (ORCPT ); Mon, 9 Feb 2015 05:45:51 -0500 From: David Laight To: "'Chen Gang S'" , Marcel Holtmann CC: Joe Perches , Sergei Shtylyov , "Gustavo F. Padovan" , Johan Hedberg , "David S. Miller" , "linux-bluetooth@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" Subject: RE: [PATCH v3] net: bluetooth: hci_sock: Use 'const u32 *' instead of 'void *' for 2nd parameter of hci_test_bit() Thread-Topic: [PATCH v3] net: bluetooth: hci_sock: Use 'const u32 *' instead of 'void *' for 2nd parameter of hci_test_bit() Thread-Index: AQHQQthhpaAu1szN7kmzIxhBmsLo5JzlmaIAgAGXpA2AAAF9AIAAfWiAgABzFqA= Date: Mon, 9 Feb 2015 10:44:44 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CAE0823@AcuExch.aculab.com> References: <54D61229.9010904@sunrus.com.cn> <1423338774.2933.9.camel@perches.com> <54D6A729.1070905@sunrus.com.cn> <54D75698.7010808@sunrus.com.cn> <54D82D7D.3000308@sunrus.com.cn> In-Reply-To: <54D82D7D.3000308@sunrus.com.cn> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 213.249.233.130 X-Env-From: David.Laight@ACULAB.COM X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1137 Lines: 28 From: Chen Gang ... > So at present, in kernel part, we can only say the original authors > intended to do like this. And only within kernel part, it can not cause > issue. I guess, original authors originally knew what we talk about. I've just searched for hci_u*filter it is all horrid. Look at the code for get/set_sockopt of HCI_FILTER. Someone seems to have done a complete 'bodge job' of fixing the user interface for apps (32bit and 64bit) on 64bit kernels. > This patch is for fixing building warnings without any negative effect. > And most of us are not the suitable members to continue analyzing. So > at present, for me, we can accept this patch. And, not uncommonly, it has shown up a 'bag of worms'. If you change 'hci_filter' to contain u32[2] then you can drop all of the casts and the temporary structures in the sockopt code. Just be aware of the tail-padding. David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/