login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
December
»
7
Re: [PATCH 01/45] kstrtox: converting strings to integers done (hopefully) right
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Arnd Bergmann
Subject:
Re: [PATCH 01/45] kstrtox: converting strings to integers done (hopefully) right
Date: Tuesday, December 7, 2010 - 2:04 am
On Monday 06 December 2010 16:16:36 Alexey Dobriyan wrote:
quoted text
> > <snip> > >> +/* Internal, do not use. */ > >> +int _kstrtol(const char *s, unsigned int base, long *res) > >> +{ > >> + long long tmp; > >> + int rv; > >> + > >> + rv = kstrtoll(s, base, &tmp); > >> + if (rv < 0) > >> + return rv; > >> + if (tmp != (long long)(long)tmp) > >> + return -EINVAL; > >> + *res = tmp; > >> + return 0; > >> +} > >> +EXPORT_SYMBOL(_kstrtol); > > > > Ok, probably I'm just being dense, but the "_" prefix tells me I probably > > shouldn't use this function. The comment clearly tells me I shouldn't use > > this function. > > So, why is this exported? And if it is not/should not be exported, then > > why is it not static? > > (goes for other functions in this patch as well). > > It is used by kstrtol() if "long" and "long long" aren't the same type. > I can't ifdef it because gcc doesn't allow "#if sizeof(long long) == ". > "Do not use" hints "use kstrtol()".
Can't you use #ifdef CONFIG_64BIT to see if long is 64 bit wide? Arnd --
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 01/45] kstrtox: converting strings to integers done ...
, Alexey Dobriyan
, (Sun Dec 5, 10:48 am)
[PATCH 02/45] kstrtox: convert arch/x86/
, Alexey Dobriyan
, (Sun Dec 5, 10:48 am)
[PATCH 03/45] kstrtox: convert arch/arm/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 04/45] kstrtox: convert kernel/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 05/45] kstrtox: kernel/trace/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 06/45] kstrtox: convert mm/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 07/45] kstrtox: convert fs/fuse/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 08/45] kstrtox: convert fs/nfs/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 09/45] kstrtox: convert fs/proc/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 10/45] kstrtox: convert security/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 11/45] kstrtox: convert block/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 12/45] kstrtox: convert drivers/acpi/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 13/45] kstrtox: convert drivers/ata/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 14/45] kstrtox: convert drivers/base/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 15/45] kstrtox: convert drivers/block/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 16/45] kstrtox: convert drivers/bluetooth/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 17/45] kstrtox: convert drivers/clocksource/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 18/45] kstrtox: convert drivers/edac/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 19/45] kstrtox: convert drivers/gpio/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 20/45] kstrtox: convert drivers/gpu/drm/nouveau/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 21/45] kstrtox: convert drivers/hid/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 22/45] kstrtox: convert drivers/hwmon/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 23/45] kstrtox: convert drivers/ide/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 24/45] kstrtox: convert drivers/infiniband/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 25/45] kstrtox: convert drivers/input/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 26/45] kstrtox: convert drivers/isdn/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 27/45] kstrtox: convert drivers/leds/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 28/45] kstrtox: convert drivers/md/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 29/45] kstrtox: convert drivers/mfd/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 30/45] kstrtox: convert drivers/misc/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 31/45] kstrtox: convert drivers/mmc/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 32/45] kstrtox: convert drivers/net/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 33/45] kstrtox: convert drivers/net/wireless/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 34/45] kstrtox: convert drivers/pci/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 35/45] kstrtox: convert drivers/platform/x86/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 36/45] kstrtox: convert drivers/power/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 37/45] kstrtox: convert drivers/regulator/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 38/45] kstrtox: convert drivers/rtc/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 39/45] kstrtox: convert drivers/scsi/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 40/45] kstrtox: convert drivers/ssb/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 41/45] kstrtox: convert drivers/usb/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 42/45] kstrtox: convert drivers/video/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 43/45] kstrtox: convert drivers/w1/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 44/45] kstrtox: convert sound/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
[PATCH 45/45] kstrtox: convert net/
, Alexey Dobriyan
, (Sun Dec 5, 10:49 am)
Re: [PATCH 26/45] kstrtox: convert drivers/isdn/
, Tilman Schmidt
, (Sun Dec 5, 5:10 pm)
Re: [PATCH 01/45] kstrtox: converting strings to integers ...
, Jesper Juhl
, (Sun Dec 5, 5:25 pm)
Re: [PATCH 01/45] kstrtox: converting strings to integers ...
, Alexey Dobriyan
, (Mon Dec 6, 8:16 am)
Re: [PATCH 26/45] kstrtox: convert drivers/isdn/
, Alexey Dobriyan
, (Mon Dec 6, 1:10 pm)
Re: [PATCH 01/45] kstrtox: converting strings to integers ...
, Arnd Bergmann
, (Tue Dec 7, 2:04 am)
Re: [PATCH 01/45] kstrtox: converting strings to integers ...
, Alexey Dobriyan
, (Tue Dec 7, 2:32 am)
Re: [PATCH 01/45] kstrtox: converting strings to integers ...
, Arnd Bergmann
, (Tue Dec 7, 2:45 am)
Re: [PATCH 26/45] kstrtox: convert drivers/isdn/
, Tilman Schmidt
, (Tue Dec 7, 3:06 am)
Re: [PATCH 01/45] kstrtox: converting strings to integers ...
, Alexey Dobriyan
, (Wed Dec 8, 1:51 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ken Chen
[patch] sched: fix inconsistency when redistribute per-cpu tg->cfs_rq shares.
Ingo Molnar
Re: [PATCH v3] x86: merge the simple bitops and move them to bitops.h
Jan Engelhardt
Re: [PATCH] Allow Kconfig to set default mmap_min_addr protection
Dmitry Torokhov
Re: [2.6 patch] input/serio/hp_sdc.c section fix
Rafael J. Wysocki
[Bug #16380] Loop devices act strangely in 2.6.35
git
:
Steven Grimm
Using git as a general backup mechanism (was Re: Using GIT to store /etc)
Jeff King
Re: [PATCH] git-reset: allow --soft in a bare repo
Johannes Sixt
Re: [PATCH 01/14] msvc: Fix compilation errors in compat/win32/sys/poll.c
Johannes Schindelin
Re: [PATCH] Uninstall rule for top level Makefile
Shawn O. Pearce
Re: [PATCH v2] Speed up bash completion loading
git-commits-head
:
Linux Kernel Mailing List
cgroups: clean up cgroup_pidlist_find() a bit
Linux Kernel Mailing List
sony-laptop: Add support for extended hotkeys
Linux Kernel Mailing List
IB/core: Add support for masked atomic operations
Linux Kernel Mailing List
V4L/DVB (8939): cx18: fix sparse warnings
Linux Kernel Mailing List
ipv6 mcast: Check address family of gf_group in getsockopt(MS_FILTER).
linux-netdev
:
Inaky Perez-Gonzalez
[PATCH 40/40] wimax/i2400m: add CREDITS and MAINTAINERS entries
Karsten Keil
[mISDN PATCH v2 05/19] Reduce stack size in dsp_cmx_send()
linux
Re: 2.6.23-rc8 network problem. Mem leak? ip1000a?
David Miller
Re: tun: Use netif_receive_skb instead of netif_rx
David Miller
Re: [net-next PATCH v2] llc enhancements
freebsd-current
:
Matthew Fleming
Re: [RFC] Outline of USB process integration in the kernel taskqueue system
illoai@gmail.com
Re: OT: 2d password
Hartmut Brandt
Re: problem with nss_ldap
Andrew Reilly
Re: FreeBSD's problems as seen by the BSDForen.de community
Max Laier
Re: Upcoming ABI Breakage in RELENG_7
Colocation donated by:
Syndicate