Commit 09fc7d22b0 (usb: musb: fix incorrect usage of resource pointer) questions
Hello. I have basically two questions on this change: 1) why it wasn't published before committing? 2) why you omitted am35x.c from this commit? WBR, Sergei -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: ozwpan: Fix build warning.
This patch fixes following build warning. drivers/built-in.o: In function `oz_hcd_heartbeat': (.text+0x30aadd): undefined reference to `__divdi3' drivers/built-in.o: In function `oz_hcd_heartbeat': (.text+0x30ac85): undefined reference to `__divdi3' Signed-off-by: Rupesh Gujare rupesh.guj...@atmel.com --- drivers/staging/ozwpan/ozhcd.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c index f81a0c5..db9c81e 100644 --- a/drivers/staging/ozwpan/ozhcd.c +++ b/drivers/staging/ozwpan/ozhcd.c @@ -1042,7 +1042,7 @@ int oz_hcd_heartbeat(void *hport) if (ep-credit 0) continue; delta = timespec_sub(ts, ep-timestamp); - ep-credit += timespec_to_ns(delta) / NSEC_PER_MSEC; + ep-credit += div64_u64(timespec_to_ns(delta), NSEC_PER_MSEC); if (ep-credit ep-credit_ceiling) ep-credit = ep-credit_ceiling; ep-timestamp = ts; @@ -1086,7 +1086,7 @@ int oz_hcd_heartbeat(void *hport) continue; } delta = timespec_sub(ts, ep-timestamp); - ep-credit += timespec_to_ns(delta) / NSEC_PER_MSEC; + ep-credit += div64_u64(timespec_to_ns(delta), NSEC_PER_MSEC); ep-timestamp = ts; while (!list_empty(ep-urb_list)) { struct oz_urb_link *urbl = -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: ozwpan: Fix build warning.
Why do not use div_u64() ? [quote]unsigned 64bit divide with 32bit divisor This is the most common 64bit divide and should be used if possible, as many 32bit archs can optimize this variant better than a full 64bit divide. [/quote] - ep-credit += timespec_to_ns(delta) / NSEC_PER_MSEC; + ep-credit += div64_u64(timespec_to_ns(delta), NSEC_PER_MSEC); -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: fix some scripts/kernel-doc warnings
On 08/03/2013 05:29 AM, Greg Kroah-Hartman wrote: On Fri, Aug 02, 2013 at 08:10:04PM +0200, Yacine Belkadi wrote: When building the htmldocs (in verbose mode), scripts/kernel-doc reports the following type of warnings: Warning(drivers/usb/core/usb.c:76): No description found for return value of 'usb_find_alt_setting' Fix them by: - adding some missing descriptions of return values - using Return sections for those descriptions Signed-off-by: Yacine Belkadi yacine.belkad...@gmail.com --- Applied to b3a3a9c441e2c8f6b6760de9331023a7906a4ac6 What does this line mean? It's the commit on which I created and applied the patch: commit b3a3a9c441e2c8f6b6760de9331023a7906a4ac6 Merge: a582e5f e70e78e Author: Linus Torvalds torva...@linux-foundation.org Date: Mon Jul 22 19:07:24 2013 -0700 Merge tag 'trace-3.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Yacine -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: fix some scripts/kernel-doc warnings
On Sun, Aug 04, 2013 at 10:05:36PM +0200, Yacine Belkadi wrote: On 08/03/2013 05:29 AM, Greg Kroah-Hartman wrote: On Fri, Aug 02, 2013 at 08:10:04PM +0200, Yacine Belkadi wrote: When building the htmldocs (in verbose mode), scripts/kernel-doc reports the following type of warnings: Warning(drivers/usb/core/usb.c:76): No description found for return value of 'usb_find_alt_setting' Fix them by: - adding some missing descriptions of return values - using Return sections for those descriptions Signed-off-by: Yacine Belkadi yacine.belkad...@gmail.com --- Applied to b3a3a9c441e2c8f6b6760de9331023a7906a4ac6 What does this line mean? It's the commit on which I created and applied the patch: commit b3a3a9c441e2c8f6b6760de9331023a7906a4ac6 Merge: a582e5f e70e78e Author: Linus Torvalds torva...@linux-foundation.org Date: Mon Jul 22 19:07:24 2013 -0700 Odd, I've never seen anyone use that before. It's really not needed, so you don't have to do that in the future. thanks, greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/4] usb: gadget: f_mass_storage: use NULL instead of 0
The local variables such as 'filename', 'vendor_name', and 'product_name' are pointers; thus, use NULL instead of 0 to fix the following sparse warnings drivers/usb/gadget/f_mass_storage.c:3046:27: warning: Using plain integer as NULL pointer drivers/usb/gadget/f_mass_storage.c:3050:28: warning: Using plain integer as NULL pointer drivers/usb/gadget/f_mass_storage.c:3051:29: warning: Using plain integer as NULL pointer Signed-off-by: Jingoo Han jg1@samsung.com --- drivers/usb/gadget/f_mass_storage.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index 56f1fd1..4d4e96a 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -3043,12 +3043,12 @@ fsg_config_from_params(struct fsg_config *cfg, lun-filename = params-file_count i params-file[i][0] ? params-file[i] - : 0; + : NULL; } /* Let MSF use defaults */ - cfg-vendor_name = 0; - cfg-product_name = 0; + cfg-vendor_name = NULL; + cfg-product_name = NULL; cfg-ops = NULL; cfg-private_data = NULL; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/4] usb: gadget: rndis: Staticize rndis_init()/rndis_exit()
rndis_init() and rndis_exit() are used only in this file. Fix the following sparse warnings: drivers/usb/gadget/rndis.c:1145:5: warning: symbol 'rndis_init' was not declared. Should it be static? drivers/usb/gadget/rndis.c:1179:6: warning: symbol 'rndis_exit' was not declared. Should it be static? Signed-off-by: Jingoo Han jg1@samsung.com --- drivers/usb/gadget/rndis.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index 3e3ea72..9575085 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c @@ -1142,7 +1142,7 @@ static struct proc_dir_entry *rndis_connect_state [RNDIS_MAX_CONFIGS]; #endif /* CONFIG_USB_GADGET_DEBUG_FILES */ -int rndis_init(void) +static int rndis_init(void) { u8 i; @@ -1176,7 +1176,7 @@ int rndis_init(void) } module_init(rndis_init); -void rndis_exit(void) +static void rndis_exit(void) { #ifdef CONFIG_USB_GADGET_DEBUG_FILES u8 i; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/4] usb: gadget: u_uac1: add __user annotation
Added __user annotation to fix the following sparse warning. drivers/usb/gadget/u_uac1.c:194:52: warning: incorrect type in argument 2 (different address spaces) drivers/usb/gadget/u_uac1.c:194:52:expected void const [noderef] asn:1*buf drivers/usb/gadget/u_uac1.c:194:52:got void *buf Signed-off-by: Jingoo Han jg1@samsung.com --- drivers/usb/gadget/u_uac1.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/u_uac1.c b/drivers/usb/gadget/u_uac1.c index c7d460f..7a55fea 100644 --- a/drivers/usb/gadget/u_uac1.c +++ b/drivers/usb/gadget/u_uac1.c @@ -191,7 +191,7 @@ try_again: frames = bytes_to_frames(runtime, count); old_fs = get_fs(); set_fs(KERNEL_DS); - result = snd_pcm_lib_write(snd-substream, buf, frames); + result = snd_pcm_lib_write(snd-substream, (void __user *)buf, frames); if (result != frames) { ERROR(card, Playback error: %d\n, (int)result); set_fs(old_fs); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/4] usb: gadget: f_uac1: Staticize local functions
control_selector_init() is used only in this file. audio_bind_config() is used only in audio.c file to which f_uac1.c is included. Thus, these functions are staticized to fix the following warnings. drivers/usb/gadget/f_uac1.c:698:12: warning: symbol 'control_selector_init' was not declared. Should it be static? drivers/usb/gadget/f_uac1.c:722:12: warning: symbol 'audio_bind_config' was not declared. Should it be static? Signed-off-by: Jingoo Han jg1@samsung.com --- drivers/usb/gadget/f_uac1.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/f_uac1.c b/drivers/usb/gadget/f_uac1.c index fa8ea4e..2b4c82d 100644 --- a/drivers/usb/gadget/f_uac1.c +++ b/drivers/usb/gadget/f_uac1.c @@ -695,7 +695,7 @@ static int generic_get_cmd(struct usb_audio_control *con, u8 cmd) } /* Todo: add more control selecotor dynamically */ -int __init control_selector_init(struct f_audio *audio) +static int __init control_selector_init(struct f_audio *audio) { INIT_LIST_HEAD(audio-cs); list_add(feature_unit.list, audio-cs); @@ -719,7 +719,7 @@ int __init control_selector_init(struct f_audio *audio) * * Returns zero on success, else negative errno. */ -int __init audio_bind_config(struct usb_configuration *c) +static int __init audio_bind_config(struct usb_configuration *c) { struct f_audio *audio; int status; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/4] usb: gadget: f_uac1: Staticize local functions
On 5 August 2013 08:45, Jingoo Han jg1@samsung.com wrote: control_selector_init() is used only in this file. audio_bind_config() is used only in audio.c file to which f_uac1.c is included. Thus, these functions are staticized to fix the following warnings. drivers/usb/gadget/f_uac1.c:698:12: warning: symbol 'control_selector_init' was not declared. Should it be static? drivers/usb/gadget/f_uac1.c:722:12: warning: symbol 'audio_bind_config' was not declared. Should it be static? Signed-off-by: Jingoo Han jg1@samsung.com Acked-by: Jassi Brar jaswinder.si...@linaro.org --- drivers/usb/gadget/f_uac1.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/f_uac1.c b/drivers/usb/gadget/f_uac1.c index fa8ea4e..2b4c82d 100644 --- a/drivers/usb/gadget/f_uac1.c +++ b/drivers/usb/gadget/f_uac1.c @@ -695,7 +695,7 @@ static int generic_get_cmd(struct usb_audio_control *con, u8 cmd) } /* Todo: add more control selecotor dynamically */ -int __init control_selector_init(struct f_audio *audio) +static int __init control_selector_init(struct f_audio *audio) { INIT_LIST_HEAD(audio-cs); list_add(feature_unit.list, audio-cs); @@ -719,7 +719,7 @@ int __init control_selector_init(struct f_audio *audio) * * Returns zero on success, else negative errno. */ -int __init audio_bind_config(struct usb_configuration *c) +static int __init audio_bind_config(struct usb_configuration *c) { struct f_audio *audio; int status; -- 1.7.10.4 -- Linaro.org │ Open source software for ARM SoCs | Follow Linaro http://facebook.com/pages/Linaro/155974581091106 - http://twitter.com/#!/linaroorg - http://linaro.org/linaro-blog -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/4] usb: gadget: u_uac1: add __user annotation
On 5 August 2013 08:44, Jingoo Han jg1@samsung.com wrote: Added __user annotation to fix the following sparse warning. drivers/usb/gadget/u_uac1.c:194:52: warning: incorrect type in argument 2 (different address spaces) drivers/usb/gadget/u_uac1.c:194:52:expected void const [noderef] asn:1*buf drivers/usb/gadget/u_uac1.c:194:52:got void *buf Signed-off-by: Jingoo Han jg1@samsung.com Acked-by: Jassi Brar jaswinder.si...@linaro.org --- drivers/usb/gadget/u_uac1.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/u_uac1.c b/drivers/usb/gadget/u_uac1.c index c7d460f..7a55fea 100644 --- a/drivers/usb/gadget/u_uac1.c +++ b/drivers/usb/gadget/u_uac1.c @@ -191,7 +191,7 @@ try_again: frames = bytes_to_frames(runtime, count); old_fs = get_fs(); set_fs(KERNEL_DS); - result = snd_pcm_lib_write(snd-substream, buf, frames); + result = snd_pcm_lib_write(snd-substream, (void __user *)buf, frames); if (result != frames) { ERROR(card, Playback error: %d\n, (int)result); set_fs(old_fs); -- 1.7.10.4 -- Linaro.org │ Open source software for ARM SoCs | Follow Linaro http://facebook.com/pages/Linaro/155974581091106 - http://twitter.com/#!/linaroorg - http://linaro.org/linaro-blog -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] usb: phy: mv-u3d: Staticize mv_u3d_phy_shutdown()
mv_u3d_phy_shutdown() is used only in this file. Fix the following sparse warning: drivers/usb/phy/phy-mv-u3d-usb.c:85:6: warning: symbol 'mv_u3d_phy_shutdown' was not declared. Should it be static? Signed-off-by: Jingoo Han jg1@samsung.com --- drivers/usb/phy/phy-mv-u3d-usb.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-mv-u3d-usb.c b/drivers/usb/phy/phy-mv-u3d-usb.c index 1568ea6..ef2017f 100644 --- a/drivers/usb/phy/phy-mv-u3d-usb.c +++ b/drivers/usb/phy/phy-mv-u3d-usb.c @@ -82,7 +82,7 @@ static void mv_u3d_phy_write(void __iomem *base, u32 reg, u32 value) writel_relaxed(value, data); } -void mv_u3d_phy_shutdown(struct usb_phy *phy) +static void mv_u3d_phy_shutdown(struct usb_phy *phy) { struct mv_u3d_phy *mv_u3d_phy; void __iomem *base; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] usb: phy: mv-usb: remove incorrect __exit_p annotation
When platform_driver_probe() is not used, bind/unbind via sysfs is enabled. Thus, __exit_p annotation should be removed from remove(). Also, mv_otg_remove() is staticized, because this function is used only in this file. Fix the following sparse warning: drivers/usb/phy/phy-mv-usb.c:656:5: warning: symbol 'mv_otg_remove' was not declared. Should it be static? Signed-off-by: Jingoo Han jg1@samsung.com --- drivers/usb/phy/phy-mv-usb.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/phy/phy-mv-usb.c b/drivers/usb/phy/phy-mv-usb.c index 4a6b03c..45c5a75 100644 --- a/drivers/usb/phy/phy-mv-usb.c +++ b/drivers/usb/phy/phy-mv-usb.c @@ -653,7 +653,7 @@ static struct attribute_group inputs_attr_group = { .attrs = inputs_attrs, }; -int mv_otg_remove(struct platform_device *pdev) +static int mv_otg_remove(struct platform_device *pdev) { struct mv_otg *mvotg = platform_get_drvdata(pdev); @@ -893,7 +893,7 @@ static int mv_otg_resume(struct platform_device *pdev) static struct platform_driver mv_otg_driver = { .probe = mv_otg_probe, - .remove = __exit_p(mv_otg_remove), + .remove = mv_otg_remove, .driver = { .owner = THIS_MODULE, .name = driver_name, -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] usb: core: don't try to reset_device() a port that got just disconnected
On Wed, Jul 31, 2013 at 11:30:28AM -0700, Sarah Sharp wrote: From: Julius Werner jwer...@chromium.org The USB hub driver's event handler contains a check to catch SuperSpeed devices that transitioned into the SS.Inactive state and tries to fix them with a reset. It decides whether to do a plain hub port reset or call the usb_reset_device() function based on whether there was a device attached to the port. However, there are device/hub combinations (found with a JetFlash Transcend mass storage stick (8564:1000) on the root hub of an Intel LynxPoint PCH) which can transition to the SS.Inactive state on disconnect (and stay there long enough for the host to notice). In this case, above-mentioned reset check will call usb_reset_device() on the stale device data structure. The kernel will send pointless LPM control messages to the no longer connected device address and can even cause several 5 second khubd stalls on some (buggy?) host controllers, before finally accepting the device's fate amongst a flurry of error messages. This patch makes the choice of reset dependent on the port status that has just been read from the hub in addition to the existence of an in-kernel data structure for the device, and only proceeds with the more extensive reset if both are valid. Signed-off-by: Julius Werner jwer...@chromium.org Signed-off-by: Sarah Sharp sarah.a.sh...@linux.intel.com --- drivers/usb/core/hub.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Should this patch also go to the stable kernel releases? thanks, greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Pull Request] xhci: Misc bug fixes for 3.11.
On Wed, Jul 31, 2013 at 11:30:27AM -0700, Sarah Sharp wrote: The following changes since commit fed1f1ed90bce42ea010e2904cbc04e7b8304940: USB: serial: ftdi_sio: add more RT Systems ftdi devices (2013-07-29 13:38:38 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git tags/for-usb-linus-2013-07-31 Pulled and pushed out, thanks. greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html