Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp455765rdh; Wed, 14 Feb 2024 01:47:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXXIsgqKLgId+FS6llBKACK9W8Z7S/HrhgUH5mig0J+dug4SYmRVAEB3zof/7R6gPQQOxRgARWGtDUTS9Ztrg+gjaV1gFu/j998Pl45rg== X-Google-Smtp-Source: AGHT+IGgk1RNJWyEBbsB8KiArub0Zj+MHt4sPvf4bbzzDLSRW5pDDBKrc0mXwNCR+VtLudOkrVln X-Received: by 2002:a05:6214:2461:b0:68c:c623:1d8c with SMTP id im1-20020a056214246100b0068cc6231d8cmr2646271qvb.23.1707904028346; Wed, 14 Feb 2024 01:47:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707904028; cv=pass; d=google.com; s=arc-20160816; b=A7XNS3iZUuceMQHELbUhxImmlMFe4Q1xN3SgqOp4rV3Vx3M1F2IFER1gD6XryaNJEF v/4SG4CnwGtiXqJETev3RJ/PYuu7dV79sJlIAd1qb//0BQk6DjTQeGVHDKhCgfhn1UB6 OMF64HDI67FjxEY7BY57ZOV68T7Q4d8VKkVUX1cEB2toU8bNGCiQ86jlxI6CVgz418Nl 7/OVJ/cnzJHTCQdMgFNa6CvVRw5nhMIzcInvgmGiXPBqMd7Qz6zTtsLsogzqvoQ1qXLk VRhqkXuTqEGBq4db3vyBklvl2kfecIv/0C6k7Hu8cJnISC1Jw8S3Q+IeRso/iyrFhr7l 86MQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=20hKDjWo2CDxqKBu+FOCmQviXJgYxVJpj2EY0nR6WeI=; fh=sntrMolC0rdxYTlu7cXZmptWOoWr3FqBQFGk+mP1tWc=; b=Dv82LAsgbXtu3BRW9TxunvllzRlOmGuXVWMVhE7evzOSgaq02IgI/JCAAXIlqrl4Qr mDnxZi9wlAIW1UrYsYcQmUwDZHCKhvYYfI43pf3nzI4GjIHeu20fHqG4E9iJsOosT0Tq EC7wNkXyuEHwxGaEHnVZOC83h+mLv/bU7gI5wi7jy/CUlCXy6Nk3ERDnquesm5IgrvCP 5zn96kQpCob9EC2rW8PdAk2qOHHlwpt2Vw4yCrTWYR9ypjHGzbLfHU7ywprpwSdiWLYa bCrIH0d7ktTmxevLKZpsO6lV9BUZaoXOoYV6dPZGdaWxjHt0jY0Rljthx8LMuy6shr26 fDAg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=aculab.com dmarc=pass fromdomain=aculab.com); spf=pass (google.com: domain of linux-kernel+bounces-64996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com X-Forwarded-Encrypted: i=2; AJvYcCUUMzEJV/7AltNbBYs8PbWsyAlbH/ZN8Ns9qoGGC3ScdZfXoLauEW7hRwOdIIiXzqWRYRbesIrlMAh1lOFI/tq0SNYMYiqzskHaEc0Ulw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id jn9-20020ad45de9000000b0068cbe9b518esi4853133qvb.204.2024.02.14.01.47.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 01:47:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=aculab.com dmarc=pass fromdomain=aculab.com); spf=pass (google.com: domain of linux-kernel+bounces-64996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1D1751C2212D for ; Wed, 14 Feb 2024 09:47:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30D3B13AF3; Wed, 14 Feb 2024 09:47:01 +0000 (UTC) Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A15313AD8 for ; Wed, 14 Feb 2024 09:46:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.58.86.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707904020; cv=none; b=r/u0XzMU4HGXJH5OIbNLYqDckILTBG/Y2fqVlvwFdrrcuP6ILJcB9/7pSmdmyDa8oG/DOWJlcMVjMuSVXwJpU8daqnQS88eyo7aKfK93sEfMA8JeeM0sBLTbQznQ8qLqvYvr2969EKijz48rg3j5jsfVSXpm/a5EeeT4MTAoT8o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707904020; c=relaxed/simple; bh=NDP3lJv4zleZeVDMxL6XQcti+46aisw1jmKXENGIgRY=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: MIME-Version:Content-Type; b=NuQJj159z++OrDw4m4OtisrLsK2ze6aGVkxGtVmcEqE8ZmQCwgZ9ScFBiWCxo2i/tcTx+TG4r94Erjz6d900hqmiYjjL/2FJTjPrH0Pjc84GaXGddWtEtg+BRiwAtkBSGCSdzgK1vctcfkOiIIiTUoeSFkA8jl9IplXtmtuUH5w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM; spf=pass smtp.mailfrom=aculab.com; arc=none smtp.client-ip=185.58.86.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aculab.com Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-123-NIfzbVeEN7a3ZZr9tPCsfQ-1; Wed, 14 Feb 2024 09:46:55 +0000 X-MC-Unique: NIfzbVeEN7a3ZZr9tPCsfQ-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 14 Feb 2024 09:46:33 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Wed, 14 Feb 2024 09:46:33 +0000 From: David Laight To: 'Segher Boessenkool' , Arnd Bergmann CC: "linuxppc-dev@lists.ozlabs.org" , "Arnd Bergmann" , Greg Kroah-Hartman , "llvm@lists.linux.dev" , Nick Desaulniers , "linux-kernel@vger.kernel.org" , Nathan Chancellor , "Bill Wendling" , "linux-serial@vger.kernel.org" , Justin Stitt , "Jiri Slaby" Subject: RE: [PATCH] tty: hvc-iucv: fix function pointer casts Thread-Topic: [PATCH] tty: hvc-iucv: fix function pointer casts Thread-Index: AQHaXrGUxAtD30hgkEO/PHRuEZrHGLEJlp9g Date: Wed, 14 Feb 2024 09:46:33 +0000 Message-ID: <57d72e2ccc8245fe99982613a11c461c@AcuMS.aculab.com> References: <20240213101756.461701-1-arnd@kernel.org> <20240213191254.GA19790@gate.crashing.org> In-Reply-To: <20240213191254.GA19790@gate.crashing.org> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable From: Segher Boessenkool > Sent: 13 February 2024 19:13 >=20 > On Tue, Feb 13, 2024 at 11:17:49AM +0100, Arnd Bergmann wrote: > > clang warns about explicitly casting between incompatible function > > pointers: > > > > drivers/tty/hvc/hvc_iucv.c:1100:23: error: cast from 'void (*)(const vo= id *)' to 'void (*)(struct > device *)' converts to incompatible function type [-Werror,-Wcast-functio= n-type-strict] > > 1100 | priv->dev->release =3D (void (*)(struct device *)) kfre= e; > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > Such a cast of course is explicitly allowed by 6.3.2.3/8, only calling a > function using a non-compatible type is UB. This warning message is > quite misleading. Doubly so because of the -Werror, as always. But it will get called using the wrong type. And (is it) fine-ibt will reject the incorrect call. Has clang/gcc added an attribute to 'seed' the ibt hash yet? So that functions that are void (*)(void) can be separated? =09David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)