* spaces after typecasts?
@ 2020-02-19 13:27 Anuz Pratap Singh Tomar
2020-02-19 18:56 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Anuz Pratap Singh Tomar @ 2020-02-19 13:27 UTC (permalink / raw)
To: kernelnewbies
[-- Attachment #1.1: Type: text/plain, Size: 239 bytes --]
Hi all,
I don't see anything in coding guidelines about spaces after typecasts i.e.
(char *)x; vs (char *) x;.
Typecasts are considered keywords or not? given you could typecast to a non
C keyword as well?
--
Thank you
Warm Regards
Anuz
[-- Attachment #1.2: Type: text/html, Size: 421 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: spaces after typecasts?
2020-02-19 13:27 spaces after typecasts? Anuz Pratap Singh Tomar
@ 2020-02-19 18:56 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2020-02-19 18:56 UTC (permalink / raw)
To: Anuz Pratap Singh Tomar; +Cc: kernelnewbies
On Wed, Feb 19, 2020 at 01:27:45PM +0000, Anuz Pratap Singh Tomar wrote:
> Hi all,
> I don't see anything in coding guidelines about spaces after typecasts i.e.
> (char *)x; vs (char *) x;.
> Typecasts are considered keywords or not? given you could typecast to a non
> C keyword as well?
(char *)x;
checkpatch.pl will catch this for you, try it and see :)
thanks,
greg k-h
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-19 18:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-19 13:27 spaces after typecasts? Anuz Pratap Singh Tomar
2020-02-19 18:56 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).