[tiwai-sound:for-next 66/82] sound/usb/usx2y/usb_stream.c:668:17: warning: variable 'iters' set but not used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next head: e95b9f7f2ee05bbef3bf6a4cd7da6e887f17f652 commit: f8466d91f36d97e237ea1b3c6f19de980054a1b6 [66/82] ALSA: usx2y: Use standard print API config: x86_64-randconfig-161-20240808 (https://download.01.org/0day-ci/archive/20240809/202408090249.8LE9qrae-lkp@i...) compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240809/202408090249.8LE9qrae-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202408090249.8LE9qrae-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from sound/usb/usx2y/us122l.c:15:
sound/usb/usx2y/usb_stream.c:668:17: warning: variable 'iters' set but not used [-Wunused-but-set-variable]
668 | int frame = 0, iters = 0; | ^ 1 warning generated.
vim +/iters +668 sound/usb/usx2y/usb_stream.c
030a07e441296c Karsten Wiese 2008-07-30 664 030a07e441296c Karsten Wiese 2008-07-30 665 int usb_stream_start(struct usb_stream_kernel *sk) 030a07e441296c Karsten Wiese 2008-07-30 666 { 030a07e441296c Karsten Wiese 2008-07-30 667 struct usb_stream *s = sk->s; 030a07e441296c Karsten Wiese 2008-07-30 @668 int frame = 0, iters = 0; 030a07e441296c Karsten Wiese 2008-07-30 669 int u, err; 030a07e441296c Karsten Wiese 2008-07-30 670 int try = 0; 030a07e441296c Karsten Wiese 2008-07-30 671 030a07e441296c Karsten Wiese 2008-07-30 672 if (s->state != usb_stream_stopped) 030a07e441296c Karsten Wiese 2008-07-30 673 return -EAGAIN; 030a07e441296c Karsten Wiese 2008-07-30 674 030a07e441296c Karsten Wiese 2008-07-30 675 subs_set_complete(sk->inurb, i_capture_start); 030a07e441296c Karsten Wiese 2008-07-30 676 subs_set_complete(sk->outurb, i_playback_start); 030a07e441296c Karsten Wiese 2008-07-30 677 memset(sk->write_page, 0, s->write_size); 030a07e441296c Karsten Wiese 2008-07-30 678 dotry: 030a07e441296c Karsten Wiese 2008-07-30 679 s->insize_done = 0; 030a07e441296c Karsten Wiese 2008-07-30 680 s->idle_insize = 0; 030a07e441296c Karsten Wiese 2008-07-30 681 s->idle_outsize = 0; 030a07e441296c Karsten Wiese 2008-07-30 682 s->sync_packet = -1; 030a07e441296c Karsten Wiese 2008-07-30 683 s->inpacket_head = -1; 030a07e441296c Karsten Wiese 2008-07-30 684 sk->iso_frame_balance = 0; 030a07e441296c Karsten Wiese 2008-07-30 685 ++try; 030a07e441296c Karsten Wiese 2008-07-30 686 for (u = 0; u < 2; u++) { 030a07e441296c Karsten Wiese 2008-07-30 687 struct urb *inurb = sk->inurb[u]; 030a07e441296c Karsten Wiese 2008-07-30 688 struct urb *outurb = sk->outurb[u]; 4c0a58ef36f3de Takashi Iwai 2021-05-17 689 030a07e441296c Karsten Wiese 2008-07-30 690 playback_prep_freqn(sk, outurb); 030a07e441296c Karsten Wiese 2008-07-30 691 inurb->number_of_packets = outurb->number_of_packets; 030a07e441296c Karsten Wiese 2008-07-30 692 inurb->transfer_buffer_length = 030a07e441296c Karsten Wiese 2008-07-30 693 inurb->number_of_packets * 030a07e441296c Karsten Wiese 2008-07-30 694 inurb->iso_frame_desc[0].length; d0f3a2eb906256 Karsten Wiese 2011-12-30 695 030a07e441296c Karsten Wiese 2008-07-30 696 if (u == 0) { 030a07e441296c Karsten Wiese 2008-07-30 697 int now; 030a07e441296c Karsten Wiese 2008-07-30 698 struct usb_device *dev = inurb->dev; 4c0a58ef36f3de Takashi Iwai 2021-05-17 699 030a07e441296c Karsten Wiese 2008-07-30 700 frame = usb_get_current_frame_number(dev); 030a07e441296c Karsten Wiese 2008-07-30 701 do { 030a07e441296c Karsten Wiese 2008-07-30 702 now = usb_get_current_frame_number(dev); 030a07e441296c Karsten Wiese 2008-07-30 703 ++iters; 030a07e441296c Karsten Wiese 2008-07-30 704 } while (now > -1 && now == frame); 030a07e441296c Karsten Wiese 2008-07-30 705 } 030a07e441296c Karsten Wiese 2008-07-30 706 err = usb_submit_urb(inurb, GFP_ATOMIC); 030a07e441296c Karsten Wiese 2008-07-30 707 if (err < 0) { f8466d91f36d97 Takashi Iwai 2024-08-07 708 dev_err(&sk->dev->dev, f8466d91f36d97 Takashi Iwai 2024-08-07 709 "%s: usb_submit_urb(sk->inurb[%i]) returned %i\n", f8466d91f36d97 Takashi Iwai 2024-08-07 710 __func__, u, err); 030a07e441296c Karsten Wiese 2008-07-30 711 return err; 030a07e441296c Karsten Wiese 2008-07-30 712 } 030a07e441296c Karsten Wiese 2008-07-30 713 err = usb_submit_urb(outurb, GFP_ATOMIC); 030a07e441296c Karsten Wiese 2008-07-30 714 if (err < 0) { f8466d91f36d97 Takashi Iwai 2024-08-07 715 dev_err(&sk->dev->dev, f8466d91f36d97 Takashi Iwai 2024-08-07 716 "%s: usb_submit_urb(sk->outurb[%i]) returned %i\n", f8466d91f36d97 Takashi Iwai 2024-08-07 717 __func__, u, err); 030a07e441296c Karsten Wiese 2008-07-30 718 return err; 030a07e441296c Karsten Wiese 2008-07-30 719 } d0f3a2eb906256 Karsten Wiese 2011-12-30 720 030a07e441296c Karsten Wiese 2008-07-30 721 if (inurb->start_frame != outurb->start_frame) { f8466d91f36d97 Takashi Iwai 2024-08-07 722 dev_dbg(&sk->dev->dev, f8466d91f36d97 Takashi Iwai 2024-08-07 723 "%s: u[%i] start_frames differ in:%u out:%u\n", f8466d91f36d97 Takashi Iwai 2024-08-07 724 __func__, u, inurb->start_frame, outurb->start_frame); 030a07e441296c Karsten Wiese 2008-07-30 725 goto check_retry; 030a07e441296c Karsten Wiese 2008-07-30 726 } 030a07e441296c Karsten Wiese 2008-07-30 727 } 030a07e441296c Karsten Wiese 2008-07-30 728 try = 0; 030a07e441296c Karsten Wiese 2008-07-30 729 check_retry: 030a07e441296c Karsten Wiese 2008-07-30 730 if (try) { 030a07e441296c Karsten Wiese 2008-07-30 731 usb_stream_stop(sk); 030a07e441296c Karsten Wiese 2008-07-30 732 if (try < 5) { 030a07e441296c Karsten Wiese 2008-07-30 733 msleep(1500); f8466d91f36d97 Takashi Iwai 2024-08-07 734 dev_dbg(&sk->dev->dev, "goto dotry;\n"); 030a07e441296c Karsten Wiese 2008-07-30 735 goto dotry; 030a07e441296c Karsten Wiese 2008-07-30 736 } f8466d91f36d97 Takashi Iwai 2024-08-07 737 dev_warn(&sk->dev->dev, f8466d91f36d97 Takashi Iwai 2024-08-07 738 "%s: couldn't start all urbs on the same start_frame.\n", f8466d91f36d97 Takashi Iwai 2024-08-07 739 __func__); 030a07e441296c Karsten Wiese 2008-07-30 740 return -EFAULT; 030a07e441296c Karsten Wiese 2008-07-30 741 } 030a07e441296c Karsten Wiese 2008-07-30 742 030a07e441296c Karsten Wiese 2008-07-30 743 sk->idle_inurb = sk->inurb[USB_STREAM_NURBS - 2]; 030a07e441296c Karsten Wiese 2008-07-30 744 sk->idle_outurb = sk->outurb[USB_STREAM_NURBS - 2]; 030a07e441296c Karsten Wiese 2008-07-30 745 sk->completed_inurb = sk->inurb[USB_STREAM_NURBS - 1]; 030a07e441296c Karsten Wiese 2008-07-30 746 sk->completed_outurb = sk->outurb[USB_STREAM_NURBS - 1]; 030a07e441296c Karsten Wiese 2008-07-30 747
:::::: The code at line 668 was first introduced by commit :::::: 030a07e441296c372f946cd4065b5d831d8dc40c ALSA: Add USB US122L driver
:::::: TO: Karsten Wiese fzu@wemgehoertderstaat.de :::::: CC: Jaroslav Kysela perex@perex.cz
participants (1)
-
kernel test robot