Re: doubt about sm7xxfb
On Wed, Feb 11, 2015 at 11:58:18AM +0530, Sudip Mukherjee wrote: > On Wed, Feb 11, 2015 at 12:36:36PM +0800, Greg Kroah-Hartman wrote: > > On Tue, Feb 10, 2015 at 07:37:47PM +0530, Sudip Mukherjee wrote: > > > Hi Greg, > > > we have this sm7xxfb in drivers/staging now which is supporting SM710, > > > SM712, SM721 and SM722. I am also working on another new hardware > > > SM750, which will be ready for staging in next 1 -2 weeks. > > > this SM750 is entirely different hardware and these two drivers will > > > have nothing in common. > > > > Then make a new driver! > ok, but then won't the name sm7xxfb will be misleading? Sure, but really, who cares :) > > But why would a new driver go into staging? Anything new you create > > should just go into the "correct" part of the kernel. Don't waste your > > time on staging. > > this code has been given to me by Silicon Motion, and will require a > few changes before it can be used with current kernel version. And to > merge it into video/fbdev it will require many changes and cleanups. > But to be frank this will have much less work to do compared to > sm7xxfb, but as this is not part of my dayjob i can not give my full > time to it. So I was thinking of staging. Ok, that makes sense, I was thinking this was a "new" driver, instead of a vendor driver crud. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: doubt about sm7xxfb
On Wed, Feb 11, 2015 at 12:36:36PM +0800, Greg Kroah-Hartman wrote: > On Tue, Feb 10, 2015 at 07:37:47PM +0530, Sudip Mukherjee wrote: > > Hi Greg, > > we have this sm7xxfb in drivers/staging now which is supporting SM710, > > SM712, SM721 and SM722. I am also working on another new hardware > > SM750, which will be ready for staging in next 1 -2 weeks. > > this SM750 is entirely different hardware and these two drivers will > > have nothing in common. > > Then make a new driver! ok, but then won't the name sm7xxfb will be misleading? > > But why would a new driver go into staging? Anything new you create > should just go into the "correct" part of the kernel. Don't waste your > time on staging. this code has been given to me by Silicon Motion, and will require a few changes before it can be used with current kernel version. And to merge it into video/fbdev it will require many changes and cleanups. But to be frank this will have much less work to do compared to sm7xxfb, but as this is not part of my dayjob i can not give my full time to it. So I was thinking of staging. regards sudip > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 2/6] staging: rtl8188eu: hal: removed code indent error
This patch removed indentation with a tab error ERROR: code indent should use tabs where possible Signed-off-by: Pushpendra Singh --- drivers/staging/rtl8188eu/hal/rf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/rf.c b/drivers/staging/rtl8188eu/hal/rf.c index 88a026c..d6daaca 100644 --- a/drivers/staging/rtl8188eu/hal/rf.c +++ b/drivers/staging/rtl8188eu/hal/rf.c @@ -101,7 +101,8 @@ void rtl88eu_phy_rf6052_set_cck_txpower(struct adapter *adapt, u8 *powerlevel) ptr++; } } - rtl88eu_dm_txpower_track_adjust(&hal_data->odmpriv, 1, &direction, &pwrtrac_value); + rtl88eu_dm_txpower_track_adjust(&hal_data->odmpriv, 1, + &direction, &pwrtrac_value); if (direction == 1) { /* Increase TX power */ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: doubt about sm7xxfb
On Tue, Feb 10, 2015 at 07:37:47PM +0530, Sudip Mukherjee wrote: > Hi Greg, > we have this sm7xxfb in drivers/staging now which is supporting SM710, > SM712, SM721 and SM722. I am also working on another new hardware > SM750, which will be ready for staging in next 1 -2 weeks. > this SM750 is entirely different hardware and these two drivers will > have nothing in common. Then make a new driver! But why would a new driver go into staging? Anything new you create should just go into the "correct" part of the kernel. Don't waste your time on staging. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: resolves sparse warnings using static declaration
This patch resolves sparse warnings about non-declared symbol in staging/lustre/lustre/lov by adding static declaration. These warnings are like this: warning: symbol 'fiemap_calc_fm_end_offset' was not declared. Should it be static? Signed-off-by: Le Tan --- drivers/staging/lustre/lustre/lov/lov_dev.c| 2 +- drivers/staging/lustre/lustre/lov/lov_ea.c | 8 drivers/staging/lustre/lustre/lov/lov_obd.c| 24 drivers/staging/lustre/lustre/lov/lov_object.c | 2 +- drivers/staging/lustre/lustre/lov/lov_pool.c | 2 +- drivers/staging/lustre/lustre/lov/lproc_lov.c | 4 ++-- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/staging/lustre/lustre/lov/lov_dev.c b/drivers/staging/lustre/lustre/lov/lov_dev.c index 796a015..711b837 100644 --- a/drivers/staging/lustre/lustre/lov/lov_dev.c +++ b/drivers/staging/lustre/lustre/lov/lov_dev.c @@ -60,7 +60,7 @@ struct kmem_cache *lovsub_req_kmem; struct kmem_cache *lov_lock_link_kmem; /** Lock class of lov_device::ld_mutex. */ -struct lock_class_key cl_lov_device_mutex_class; +static struct lock_class_key cl_lov_device_mutex_class; struct lu_kmem_descr lov_caches[] = { { diff --git a/drivers/staging/lustre/lustre/lov/lov_ea.c b/drivers/staging/lustre/lustre/lov/lov_ea.c index e9ec39c..d1b0417 100644 --- a/drivers/staging/lustre/lustre/lov/lov_ea.c +++ b/drivers/staging/lustre/lustre/lov/lov_ea.c @@ -209,8 +209,8 @@ static int lsm_lmm_verify_v1(struct lov_mds_md_v1 *lmm, int lmm_bytes, return lsm_lmm_verify_common(lmm, lmm_bytes, *stripe_count); } -int lsm_unpackmd_v1(struct lov_obd *lov, struct lov_stripe_md *lsm, - struct lov_mds_md_v1 *lmm) +static int lsm_unpackmd_v1(struct lov_obd *lov, struct lov_stripe_md *lsm, + struct lov_mds_md_v1 *lmm) { struct lov_oinfo *loi; int i; @@ -287,8 +287,8 @@ static int lsm_lmm_verify_v3(struct lov_mds_md *lmmv1, int lmm_bytes, *stripe_count); } -int lsm_unpackmd_v3(struct lov_obd *lov, struct lov_stripe_md *lsm, - struct lov_mds_md *lmmv1) +static int lsm_unpackmd_v3(struct lov_obd *lov, struct lov_stripe_md *lsm, + struct lov_mds_md *lmmv1) { struct lov_mds_md_v3 *lmm; struct lov_oinfo *loi; diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index ea503d2..5781c18 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -1601,9 +1601,9 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len, * \param fm_end logical end of mapping * \param start_stripe starting stripe will be returned in this */ -u64 fiemap_calc_fm_end_offset(struct ll_user_fiemap *fiemap, - struct lov_stripe_md *lsm, u64 fm_start, - u64 fm_end, int *start_stripe) +static u64 fiemap_calc_fm_end_offset(struct ll_user_fiemap *fiemap, +struct lov_stripe_md *lsm, u64 fm_start, +u64 fm_end, int *start_stripe) { u64 local_end = fiemap->fm_extents[0].fe_logical; u64 lun_start, lun_end; @@ -1658,9 +1658,9 @@ u64 fiemap_calc_fm_end_offset(struct ll_user_fiemap *fiemap, * * \retval last_stripe return the last stripe of the mapping */ -int fiemap_calc_last_stripe(struct lov_stripe_md *lsm, u64 fm_start, - u64 fm_end, int start_stripe, - int *stripe_count) +static int fiemap_calc_last_stripe(struct lov_stripe_md *lsm, u64 fm_start, + u64 fm_end, int start_stripe, + int *stripe_count) { int last_stripe; u64 obd_start, obd_end; @@ -1694,10 +1694,10 @@ int fiemap_calc_last_stripe(struct lov_stripe_md *lsm, u64 fm_start, * \param ext_count number of extents to be copied * \param current_extent where to start copying in main extent array */ -void fiemap_prepare_and_copy_exts(struct ll_user_fiemap *fiemap, - struct ll_fiemap_extent *lcl_fm_ext, - int ost_index, unsigned int ext_count, - int current_extent) +static void fiemap_prepare_and_copy_exts(struct ll_user_fiemap *fiemap, +struct ll_fiemap_extent *lcl_fm_ext, +int ost_index, unsigned int ext_count, +int current_extent) { char *to; int ext; @@ -2290,7 +2290,7 @@ out: return rc; } -struct obd_ops lov_obd_ops = { +static struct obd_ops lov_obd_ops = { .o_owner = THIS_MODULE, .o_setup = lov_setup, .o_precleanup = lov_precleanup, @@ -2324,7
Fwd:Чем порадовать?=Классный подарок на 14 февраля=
=Чем порадовать?=Крутой подарок к 14 февраля= http://www.google.com/url?q=htt%70%3A%2F%2Fs%65%72gyv%70%6fda%72%6fk%2e%72%75su%62est%2e%72u%2F%23%30%35%34%31%322%334%362054%3122346%32&sa=D&sntz=1&usg=AFQjCNHQQm8l6YWW5otIPIOnsNAjWLwlzw ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
NOTIS RASMI HADIAH TELEKOM MALAYSIA
Telekom Malaysia Berhad G.03B, Ground Floor, Kompleks Antarabangsa, Jln Sultan Ismail, Off Jalan Ampang 50250 Kuala Lumpur Malaysia. NOTIS RASMI HADIAH TELEKOM MALAYSIA Pihak Telekom Malaysia @Program Kemenangan yang telah diadakan pada 9th Februari 2015 di mana alamat email anda yang disertakan beraama Tiket Kemenangan nombor 2 - 4 - 16 - 37 - 89 - 40 -85 dengan siri nombor 2268/02 telah memenangi loteri kategori hadiah kedua khas keluarga Telekom Malaysia. Untuk menuntut hadiah kemenangan ini anda dikehendaki menghubungi melalui e mail Bahagian Tuntutan untuk tujuan pemerosesan dan pembayaran hadiah wang tunai kepada anda. Di sepanjang program Khas Keluarga Telekom yang telah diadakan di Ibupejabat di Kuala Lumpur sejumlah Rm270,000.00 (Ringgit Malaysia : Dua Ratus Tujoh Puloh Ribu) telah dianugerahkan kepada anda oleh Telekom Malaysia Berhad kepada anda dan keluarga anda sempena sambutsn Hari Raya 2015 ini. Program ini turut dibiayai bersama oleh Toyota Malaysia dan Tenaga Nasional sebagai pakej istimewa Telekom 2015 dan anda perlu memahami bahawa e mail ini adalah 100% sah dan diiktiraf kerana program ini kebiasaannya diadakan sekali dalam masa lima tahun. Sila hubungi agen kami untuk menuntut hadiah ini : EN SHAFIE BIN HASSAN Pengarah Bahagian Tuntutan E-mail: tmber...@outlook.my Untuk tujuan pemerosesan sila hubungi agen kami dengan maklumat-maklumat berikut: 1) Nama Penuh: 2). Umur: 3). Pekerjaan: 4). Telefon: 5). Negeri / Bandar: Perlu diingatkan bahawa hadiah akhir tahun Telekom Malaysia Berhad 2015 ini adalah diberikan khas kepada anda dan keluarga anda dan anda hendaklah membuat tunttan ini sebelum 28th Februari 2015. Terima kasih. Mrs Nadia binti Rafik Pengurus Eksekutif Anugerah Telekom Malaysia Ibupejabat telekom Malaysia. --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCHv2 2/2] ft1000-pcmcia: ft1000_hw.c: code refactoring: add ft1000_read_dsp_timer()
Add new function ft1000_read_dsp_timer() replacing recurring code block for reading DSP timer. Such code refactoring solves all remaining "line over 80 characters" warnings reported by checkpatch.pl. Signed-off-by: Daniele Alessandrelli --- drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 197 +-- 1 file changed, 39 insertions(+), 158 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c index 23b27f8..2c14b46 100644 --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c @@ -303,6 +303,39 @@ static void ft1000_disable_interrupts(struct net_device *dev) } /*--- + Function:ft1000_read_dsp_timer + Description: This function reads the DSP timer and stores its value in the + DSP_TIME field of the ft1000_info struct passed as argument + Input: + info- ft1000_info structure + Output: + None. + + -*/ +static void ft1000_read_dsp_timer(struct ft1000_info *info) +{ + if (info->AsicID == ELECTRABUZZ_ID) { + info->DSP_TIME[0] = ft1000_read_dpram(dev, FT1000_DSP_TIMER0); + info->DSP_TIME[1] = ft1000_read_dpram(dev, FT1000_DSP_TIMER1); + info->DSP_TIME[2] = ft1000_read_dpram(dev, FT1000_DSP_TIMER2); + info->DSP_TIME[3] = ft1000_read_dpram(dev, FT1000_DSP_TIMER3); + } else { + info->DSP_TIME[0] = + ft1000_read_dpram_mag_16(dev, FT1000_MAG_DSP_TIMER0, +FT1000_MAG_DSP_TIMER0_INDX); + info->DSP_TIME[1] = + ft1000_read_dpram_mag_16(dev, FT1000_MAG_DSP_TIMER1, +FT1000_MAG_DSP_TIMER1_INDX); + info->DSP_TIME[2] = + ft1000_read_dpram_mag_16(dev, FT1000_MAG_DSP_TIMER2, +FT1000_MAG_DSP_TIMER2_INDX); + info->DSP_TIME[3] = + ft1000_read_dpram_mag_16(dev, FT1000_MAG_DSP_TIMER3, +FT1000_MAG_DSP_TIMER3_INDX); + } +} + +/*--- Function: ft1000_reset_asic Description: This function will call the Card Service function to reset the @@ -580,33 +613,7 @@ static void ft1000_hbchk(u_long data) } if (tempword != ho) { pr_info("heartbeat failed - no ho detected\n"); - if (info->AsicID == ELECTRABUZZ_ID) { - info->DSP_TIME[0] = - ft1000_read_dpram(dev, FT1000_DSP_TIMER0); - info->DSP_TIME[1] = - ft1000_read_dpram(dev, FT1000_DSP_TIMER1); - info->DSP_TIME[2] = - ft1000_read_dpram(dev, FT1000_DSP_TIMER2); - info->DSP_TIME[3] = - ft1000_read_dpram(dev, FT1000_DSP_TIMER3); - } else { - info->DSP_TIME[0] = - ft1000_read_dpram_mag_16(dev, - FT1000_MAG_DSP_TIMER0, - FT1000_MAG_DSP_TIMER0_INDX); - info->DSP_TIME[1] = - ft1000_read_dpram_mag_16(dev, - FT1000_MAG_DSP_TIMER1, - FT1000_MAG_DSP_TIMER1_INDX); - info->DSP_TIME[2] = - ft1000_read_dpram_mag_16(dev, - FT1000_MAG_DSP_TIMER2, - FT1000_MAG_DSP_TIMER2_INDX); - info->DSP_TIME[3] = - ft1000_read_dpram_mag_16(dev, - FT1000_MAG_DSP_TIMER3, - FT1000_MAG_DSP_TIMER3_INDX); - } + ft1000_read_dsp_timer(info); info->DrvErrNum = DSP_HB_INFO; if (ft1000_reset_card(dev) == 0) { pr_info("Hardware Failure Detected - PC Card disabled\n"); @@ -627,33 +634,7 @@ static void ft1000_hbchk(u_long data) if (tempword & FT1000_DB_HB) {
[PATCHv2 0/2] staging: ft1000-pcmcia: ft1000_hw.c: fix checkpatch warnings
This small patchset fixes all the style problems reported by checkpatch.pl on ft1000-pcmcia/ft1000_hw.c * Patch 1/2 fixes all trivial issues not requiring code refactoring * Patch 2/2 fixes all remaining "line over 80 characters" warnings by means of some code refactoring. Specifically, the function ft1000_read_dsp_timer() is introduced to replace a recurring block of code used for reading the DSP timer value. This updated version of the patchset should apply cleanly to Greg's Tree. Daniele Alessandrelli (2): ft1000-pcmcia: ft1000_hw.c: fix style issues not requiring code refactoring ft1000-pcmcia: ft1000_hw.c: code refactoring: add ft1000_read_dsp_timer() drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 594 ++- 1 file changed, 247 insertions(+), 347 deletions(-) -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCHv2 1/2] ft1000-pcmcia: ft1000_hw.c: fix style issues not requiring code refactoring
Fix all the trivial style issues (as reported by checkpatch.pl) not requiring code refactoring. A following patch is expected to fix the remaining issues by performing some code refactoring. Signed-off-by: Daniele Alessandrelli --- drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 455 --- 1 file changed, 237 insertions(+), 218 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c index 017c3b9..23b27f8 100644 --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c @@ -28,8 +28,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -67,8 +67,7 @@ static void ft1000_disable_interrupts(struct net_device *dev); /* new kernel */ MODULE_AUTHOR(""); -MODULE_DESCRIPTION -("Support for Flarion Flash OFDM NIC Device. Support for PCMCIA when used with ft1000_cs."); +MODULE_DESCRIPTION("Support for Flarion Flash OFDM NIC Device. Support for PCMCIA when used with ft1000_cs."); MODULE_LICENSE("GPL"); MODULE_SUPPORTED_DEVICE("FT1000"); @@ -267,7 +266,8 @@ void ft1000_write_dpram_mag_32(struct net_device *dev, int offset, u32 value) /*--- Function: ft1000_enable_interrupts - Description: This function will enable interrupts base on the current interrupt mask. + Description: This function will enable interrupts base on the current + interrupt mask. Input: dev- device structure Output: @@ -375,7 +375,8 @@ static int ft1000_reset_card(struct net_device *dev) /* Make sure we free any memory reserve for provisioning */ while (list_empty(&info->prov_list) == 0) { pr_debug("deleting provisioning record\n"); - ptr = list_entry(info->prov_list.next, struct prov_record, list); + ptr = list_entry(info->prov_list.next, struct prov_record, +list); list_del(&ptr->list); kfree(ptr->pprov_data); kfree(ptr); @@ -406,7 +407,8 @@ static int ft1000_reset_card(struct net_device *dev) FT1000_DPRAM_MAG_RX_BASE); for (i = 0; i < MAX_DSP_SESS_REC / 2; i++) { info->DSPSess.MagRec[i] = - inl(dev->base_addr + FT1000_REG_MAG_DPDATA); + inl(dev->base_addr + + FT1000_REG_MAG_DPDATA); } } spin_unlock_irqrestore(&info->dpram_lock, flags); @@ -435,11 +437,12 @@ static int ft1000_reset_card(struct net_device *dev) mdelay(10); pr_debug("Take DSP out of reset\n"); - /* Wait for 0xfefe indicating dsp ready before starting download */ + /* Wait for 0xfefe indicating dsp ready before starting +* download */ for (i = 0; i < 50; i++) { - tempword = - ft1000_read_dpram_mag_16(dev, FT1000_MAG_DPRAM_FEFE, - FT1000_MAG_DPRAM_FEFE_INDX); + tempword = ft1000_read_dpram_mag_16(dev, + FT1000_MAG_DPRAM_FEFE, + FT1000_MAG_DPRAM_FEFE_INDX); if (tempword == 0xfefe) break; mdelay(20); @@ -459,16 +462,15 @@ static int ft1000_reset_card(struct net_device *dev) if (card_download(dev, fw_entry->data, fw_entry->size)) { pr_debug("card download unsuccessful\n"); return false; - } else { - pr_debug("card download successful\n"); } + pr_debug("card download successful\n"); mdelay(10); if (info->AsicID == ELECTRABUZZ_ID) { /* -* Need to initialize the FIFO length counter to zero in order to sync up -* with the DSP +* Need to initialize the FIFO length counter to zero in order +* to sync up with the DSP */ info->fifo_cnt = 0; ft1000_write_dpram(dev, FT1000_FIFO_LEN, info->fifo_cnt); @@ -665,8 +667,8 @@ static void ft1000_hbchk(u_long data) return; } /* -* Set dedicated area to hi and ring appropriate doorbell according -* to hi/ho heartbeat protocol +* Set dedicated area to hi and ring appropriate doorbell +* according to hi/ho heartbeat protocol */ if (info->AsicID == ELECTRABUZZ_ID) {
Re: [PATCH 1/1] staging: unisys: Remove allocation from declaration line
On Tue, Feb 10, 2015 at 02:02:14PM +0100, Quentin Lambert wrote: > This patch removes allocation from declaration line because > people are known to gloss over declarations. Again, who are these lazy people, and why are they reading kernel code? Please, it's ok to allocate things in the declaration line, don't make these kinds of changes. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/6] staging: rtl8188eu: hal: removed code indent error
On Tue, Feb 10, 2015 at 06:32:49PM +0530, Pushpendra Singh wrote: > Removed checkpatch.pl error > ERROR: code indent should use tabs where possible Then fix the indentation with a tab, not using over 8 spaces, don't make this a new coding style issue that I will then get an additional patch for later from someone that will just fix up the original tab issue... thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] staging: android: Remove allocation from declaration line
On Tue, Feb 10, 2015 at 12:09:45PM +0100, Quentin Lambert wrote: > This patch removes allocation from declaration line because > people are known to gloss over declarations. Then those people should not be reviewing kernel code :) Seriously, this is unneeded churn, the code is fine as-is. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4 3/3] staging: lustre: fix coding style errors fix the
following coding style error in drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c: missing spaces around '=' Signed-off-by: Tal Shorer --- drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c index c3d00e6..d70330f 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c @@ -308,7 +308,7 @@ static int proc_console_backoff(struct ctl_table *table, int write, dummy.proc_handler = &proc_dointvec; if (!write) { /* read */ - backoff= libcfs_console_backoff; + backoff = libcfs_console_backoff; rc = proc_dointvec(&dummy, write, buffer, lenp, ppos); return rc; } -- 2.2.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4 2/3] staging: lustre: fix coding style errors
fix the following coding style error in drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c: initialization of min_watchdog_ratelimit (static int) to 0 for clarity's sake, the "= 0" is kept as part of a comment Signed-off-by: Tal Shorer --- drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c index 7c259af..c3d00e6 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c @@ -165,7 +165,7 @@ static int proc_dobitmasks(struct ctl_table *table, int write, __proc_dobitmasks); } -static int min_watchdog_ratelimit = 0; /* disable ratelimiting */ +static int min_watchdog_ratelimit; /* = 0 disable ratelimiting */ static int max_watchdog_ratelimit = (24*60*60); /* limit to once per day */ static int __proc_dump_kernel(void *data, int write, -- 2.2.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4 1/3] staging: lustre: fix coding style errors
fix the following coding style error in drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c: initialization of lnet_table_header (static pointer) to NULL Signed-off-by: Tal Shorer --- drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c index c539e37..7c259af 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c @@ -65,7 +65,7 @@ #include #include "../tracefile.h" -static struct ctl_table_header *lnet_table_header = NULL; +static struct ctl_table_header *lnet_table_header; extern char lnet_upcall[1024]; /** * The path of debug log dump upcall script. -- 2.2.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/30] staging: unisys: change visorchannel_funcs.c function variable from bool to int
From: Erik Arfvidson This patch changes visorchanne_funcs.c function variable from bool to int. Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c index ed50e52..8def9c2 100644 --- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c +++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c @@ -681,7 +681,7 @@ visorchannel_dump_section(struct visorchannel *chan, char *s, tbuf = buf; while (len > 0) { i = (len < 16) ? len : 16; - hex_dump_to_buffer(tbuf, i, 16, 1, fmtbuf, fmtbufsize, TRUE); + hex_dump_to_buffer(tbuf, i, 16, 1, fmtbuf, fmtbufsize, 1); seq_printf(seq, "%s\n", fmtbuf); tbuf += 16; len -= 16; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/30] staging: unisys: change bool to int variable found
From: Erik Arfvidson this patch changes variable 'found' from bool to int Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/virtpci/virtpci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/virtpci/virtpci.c b/drivers/staging/unisys/virtpci/virtpci.c index 8fdfd6f..d2d8151 100644 --- a/drivers/staging/unisys/virtpci/virtpci.c +++ b/drivers/staging/unisys/virtpci/virtpci.c @@ -1074,7 +1074,7 @@ static int virtpci_device_serverdown(struct device *parentbus, unsigned char macaddr[]) { int pausethisone = 0; - bool found = false; + int found = 0; struct virtpci_dev *tmpvpcidev, *prevvpcidev; struct virtpci_driver *vpcidriver; unsigned long flags; @@ -1113,7 +1113,7 @@ static int virtpci_device_serverdown(struct device *parentbus, if (!pausethisone) continue; - found = true; + found = 1; vpcidriver = tmpvpcidev->mydriver; rc = vpcidriver->suspend(tmpvpcidev, 0); } @@ -1133,7 +1133,7 @@ static int virtpci_device_serverup(struct device *parentbus, unsigned char macaddr[]) { int resumethisone = 0; - bool found = false; + int found = 0; struct virtpci_dev *tmpvpcidev, *prevvpcidev; struct virtpci_driver *vpcidriver; unsigned long flags; @@ -1171,7 +1171,7 @@ static int virtpci_device_serverup(struct device *parentbus, if (!resumethisone) continue; - found = true; + found = 1; vpcidriver = tmpvpcidev->mydriver; /* This should be done at BUS resume time, but an * existing problem prevents us from ever getting a bus -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/30] staging: unisys: remove #define bool in visorchannel.h
From: Erik Arfvidson This patche removes pound define from visorchannel.h. Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorchannel/visorchannel.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/unisys/visorchannel/visorchannel.h b/drivers/staging/unisys/visorchannel/visorchannel.h index e8df58d..d4f1651 100644 --- a/drivers/staging/unisys/visorchannel/visorchannel.h +++ b/drivers/staging/unisys/visorchannel/visorchannel.h @@ -25,9 +25,6 @@ #ifndef HOSTADDRESS #define HOSTADDRESS u64 #endif -#ifndef BOOL -#define BOOL int -#endif /* Note that for visorchannel_create() and visorchannel_create_overlapped(), * and arguments may be 0 if we are a channel CLIENT. -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/30] staging: unisys: changes visorchipset.[ch] functions from bool to int
From: Erik Arfvidson This patch changes the following functions in visorchipset.[ch] from bool to int: visorchipset_cache_alloc visorchipset_get_bus_info visorchipset_get_device_info visorchipset_set_bus_context Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorchipset/visorchipset.h | 10 +- .../unisys/visorchipset/visorchipset_main.c| 102 ++--- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset.h b/drivers/staging/unisys/visorchipset/visorchipset.h index 98f3ba4..15a20a0 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset.h +++ b/drivers/staging/unisys/visorchipset/visorchipset.h @@ -218,19 +218,19 @@ typedef void (*SPARREPORTEVENT_COMPLETE_FUNC) (struct controlvm_message *msg, void visorchipset_device_pause_response(ulong bus_no, ulong dev_no, int response); -BOOL visorchipset_get_bus_info(ulong bus_no, +int visorchipset_get_bus_info(ulong bus_no, struct visorchipset_bus_info *bus_info); -BOOL visorchipset_get_device_info(ulong bus_no, ulong dev_no, +int visorchipset_get_device_info(ulong bus_no, ulong dev_no, struct visorchipset_device_info *dev_info); -BOOL visorchipset_set_bus_context(ulong bus_no, void *context); -BOOL visorchipset_set_device_context(ulong bus_no, ulong dev_no, void *context); +int visorchipset_set_bus_context(ulong bus_no, void *context); +int visorchipset_set_device_context(ulong bus_no, ulong dev_no, void *context); int visorchipset_chipset_ready(void); int visorchipset_chipset_selftest(void); int visorchipset_chipset_notready(void); void visorchipset_save_message(struct controlvm_message *msg, enum crash_obj_type type); void *visorchipset_cache_alloc(struct kmem_cache *pool, - BOOL ok_to_block, char *fn, int ln); + int ok_to_block, char *fn, int ln); void visorchipset_cache_free(struct kmem_cache *pool, void *p, char *fn, int ln); diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index f606ee9..da20e98 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -119,7 +119,7 @@ typedef struct { struct controlvm_message_header Dumpcapture_header; struct controlvm_message_header Gettextdump_header; struct controlvm_message_header Dumpcomplete_header; - BOOL Gettextdump_outstanding; + int Gettextdump_outstanding; u32 crc32; ulong length; atomic_t buffers_in_use; @@ -136,7 +136,7 @@ static LIVEDUMP_INFO LiveDump_info; * process it again the next time controlvm_periodic_work() runs. */ static struct controlvm_message ControlVm_Pending_Msg; -static BOOL ControlVm_Pending_Msg_Valid = FALSE; +static int ControlVm_Pending_Msg_Valid; /* Pool of struct putfile_buffer_entry, for keeping track of pending (incoming) * TRANSMIT_FILE PutFile payloads. @@ -827,7 +827,7 @@ static void bus_responder(enum controlvm_id cmdId, ulong busNo, int response) { struct visorchipset_bus_info *p = NULL; - BOOL need_clear = FALSE; + int need_clear = 0; p = findbus(&BusInfoList, busNo); if (!p) { @@ -843,7 +843,7 @@ bus_responder(enum controlvm_id cmdId, ulong busNo, int response) if (cmdId == CONTROLVM_BUS_CREATE) p->state.created = 1; if (cmdId == CONTROLVM_BUS_DESTROY) - need_clear = TRUE; + need_clear = 1; } if (p->pending_msg_hdr.id == CONTROLVM_INVALID) { @@ -904,7 +904,7 @@ device_responder(enum controlvm_id cmdId, ulong busNo, ulong devNo, int response) { struct visorchipset_device_info *p = NULL; - BOOL need_clear = FALSE; + int need_clear = 0; p = finddevice(&DevInfoList, busNo, devNo); if (!p) { @@ -915,7 +915,7 @@ device_responder(enum controlvm_id cmdId, ulong busNo, ulong devNo, if (cmdId == CONTROLVM_DEVICE_CREATE) p->state.created = 1; if (cmdId == CONTROLVM_DEVICE_DESTROY) - need_clear = TRUE; + need_clear = 1; } if (p->pending_msg_hdr.id == CONTROLVM_INVALID) { @@ -935,9 +935,9 @@ device_responder(enum controlvm_id cmdId, ulong busNo, ulong devNo, static void bus_epilog(u32 busNo, u32 cmd, struct controlvm_message_header *msgHdr, - int response, BOOL needResponse) + int response, int needResponse) { - BOOL notified = FALSE; + int notified = 0; struct visorchipset_bus_info *pBusInfo = findbus(&BusInfoList, busNo); @
[PATCH 09/30] staging: unisys: changes bool to int in sig related function
From: Erik Arfvidson This patch changes the return value from bool to int to the following sig related function: sig_read_data, sig_write_data, and sig_do_data Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c index 3ccd7f9..ed50e52 100644 --- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c +++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c @@ -346,12 +346,12 @@ cleanup: return rc; } -static BOOL +static int sig_do_data(struct visorchannel *channel, u32 queue, struct signal_queue_header *sig_hdr, u32 slot, void *data, - BOOL is_write) + int is_write) { - BOOL rc = FALSE; + int rc = 0; int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue, sig_hdr, slot); if (is_write) { @@ -370,23 +370,23 @@ sig_do_data(struct visorchannel *channel, u32 queue, goto cleanup; } } - rc = TRUE; + rc = 1; cleanup: return rc; } -static inline BOOL +static inline int sig_read_data(struct visorchannel *channel, u32 queue, struct signal_queue_header *sig_hdr, u32 slot, void *data) { - return sig_do_data(channel, queue, sig_hdr, slot, data, FALSE); + return sig_do_data(channel, queue, sig_hdr, slot, data, 0); } -static inline BOOL +static inline int sig_write_data(struct visorchannel *channel, u32 queue, struct signal_queue_header *sig_hdr, u32 slot, void *data) { - return sig_do_data(channel, queue, sig_hdr, slot, data, TRUE); + return sig_do_data(channel, queue, sig_hdr, slot, data, 1); } static inline unsigned char -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/30] staging: unisys: changes function visorchannel_signalinsert from bool to int
From: Erik Arfvidson This patch changes function from visorchannel_signalinsert from bool to int. Also, changes to signalinsert_inner had to be change since visorchannel_signalinsert call that other function which return value was bool so it was change to int as well. Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorchannel/visorchannel.h | 2 +- .../staging/unisys/visorchannel/visorchannel_funcs.c | 18 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/unisys/visorchannel/visorchannel.h b/drivers/staging/unisys/visorchannel/visorchannel.h index 5b4ff15..e8df58d 100644 --- a/drivers/staging/unisys/visorchannel/visorchannel.h +++ b/drivers/staging/unisys/visorchannel/visorchannel.h @@ -54,7 +54,7 @@ int visorchannel_clear(struct visorchannel *channel, ulong offset, u8 ch, ulong nbytes); int visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg); -BOOL visorchannel_signalinsert(struct visorchannel *channel, u32 queue, +int visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg); int visorchannel_signalqueue_slots_avail(struct visorchannel *channel, u32 queue); diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c index 68befd6..0279e1f 100644 --- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c +++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c @@ -461,13 +461,13 @@ visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg) } EXPORT_SYMBOL_GPL(visorchannel_signalremove); -static BOOL +static int signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg) { struct signal_queue_header sig_hdr; if (!sig_read_header(channel, queue, &sig_hdr)) { - return FALSE; + return 0; } sig_hdr.head = ((sig_hdr.head + 1) % sig_hdr.max_slots); @@ -476,12 +476,12 @@ signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg) if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_overflows)) ERRDRV("visor_memregion_write of NumOverflows failed\n"); - return FALSE; + return 0; } if (!sig_write_data(channel, queue, &sig_hdr, sig_hdr.head, msg)) { ERRDRV("sig_write_data failed\n"); - return FALSE; + return 0; } sig_hdr.num_sent++; @@ -491,20 +491,20 @@ signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg) mb(); /* required for channel synch */ if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, head)) { ERRDRV("visor_memregion_write of Head failed\n"); - return FALSE; + return 0; } if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_sent)) { ERRDRV("visor_memregion_write of NumSignalsSent failed\n"); - return FALSE; + return 0; } - return TRUE; + return 1; } -BOOL +int visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg) { - BOOL rc; + int rc; if (channel->needs_lock) { spin_lock(&channel->insert_lock); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 30/30] staging: unisys: vbuschannel.h pragma
From: Jeffrey Brown Replaced pragma statements that was surrounding the structs spar_vbus_headerinfo and spar_vbus_channel_protocol with __packed Signed-off-by: Jeffrey Brown Signed-off-by: Benjamin Romer --- drivers/staging/unisys/common-spar/include/channels/vbuschannel.h | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h index 2c42ce1..959f074 100644 --- a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h +++ b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h @@ -57,7 +57,6 @@ static const uuid_le spar_vbus_channel_protocol_uuid = sizeof(struct ultra_vbus_channel_protocol),\ actual_bytes)) -#pragma pack(push, 1) /* both GCC and VC now allow this pragma */ struct spar_vbus_headerinfo { u32 struct_bytes; /* size of this struct in bytes */ u32 device_info_struct_bytes; /* sizeof(ULTRA_VBUS_DEVICEINFO) */ @@ -70,7 +69,7 @@ struct spar_vbus_headerinfo { u32 dev_info_offset;/* byte offset from beginning of this struct */ /* to the DevInfo array (below) */ u8 reserved[104]; -}; +} __packed; struct spar_vbus_channel_protocol { struct channel_header channel_header; /* initialized by server */ @@ -82,13 +81,11 @@ struct spar_vbus_channel_protocol { /* describes client bus device and driver */ struct ultra_vbus_deviceinfo dev_info[0]; /* describes client device and driver for each device on the bus */ -}; +} __packed; #define VBUS_CH_SIZE_EXACT(MAXDEVICES) \ (sizeof(ULTRA_VBUS_CHANNEL_PROTOCOL) + ((MAXDEVICES) * \ sizeof(ULTRA_VBUS_DEVICEINFO))) #define VBUS_CH_SIZE(MAXDEVICES) COVER(VBUS_CH_SIZE_EXACT(MAXDEVICES), 4096) -#pragma pack(pop) - #endif -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/30] staging: unisys: change visorchipset/parse.[ch] from bool to int
From: Erik Arfvidson this patch changes visorchipset variables from bool to int. Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorchipset/parser.c | 24 drivers/staging/unisys/visorchipset/parser.h | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 9edbd3b..2f997af 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -36,13 +36,13 @@ struct PARSER_CONTEXT_Tag { ulong param_bytes; u8 *curr; ulong bytes_remaining; - BOOL byte_stream; + int byte_stream; char data[0]; }; static PARSER_CONTEXT * -parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, -BOOL hasStandardPayloadHeader, BOOL *tryAgain) +parser_init_guts(u64 addr, u32 bytes, int isLocal, +int hasStandardPayloadHeader, int *tryAgain) { int allocbytes = sizeof(PARSER_CONTEXT) + bytes; PARSER_CONTEXT *rc = NULL; @@ -51,7 +51,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, struct spar_controlvm_parameters_header *phdr = NULL; if (tryAgain) - *tryAgain = FALSE; + *tryAgain = 0; if (!hasStandardPayloadHeader) /* alloc and 0 extra byte to ensure payload is * '\0'-terminated @@ -63,7 +63,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, __func__, __FILE__, __LINE__, allocbytes, MAX_CONTROLVM_PAYLOAD_BYTES); if (tryAgain) - *tryAgain = TRUE; + *tryAgain = 1; rc = NULL; goto Away; } @@ -72,7 +72,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, ERRDRV("%s (%s:%d) - failed to allocate %d bytes", __func__, __FILE__, __LINE__, allocbytes); if (tryAgain) - *tryAgain = TRUE; + *tryAgain = 1; rc = NULL; goto Away; } @@ -81,7 +81,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, ctx->param_bytes = bytes; ctx->curr = NULL; ctx->bytes_remaining = 0; - ctx->byte_stream = FALSE; + ctx->byte_stream = 0; if (isLocal) { void *p; @@ -106,7 +106,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, } } if (!hasStandardPayloadHeader) { - ctx->byte_stream = TRUE; + ctx->byte_stream = 1; rc = ctx; goto Away; } @@ -155,9 +155,9 @@ Away: } PARSER_CONTEXT * -parser_init(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain) +parser_init(u64 addr, u32 bytes, int isLocal, int *tryAgain) { - return parser_init_guts(addr, bytes, isLocal, TRUE, tryAgain); + return parser_init_guts(addr, bytes, isLocal, 1, tryAgain); } /* Call this instead of parser_init() if the payload area consists of just @@ -166,9 +166,9 @@ parser_init(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain) * parser_byteStream_get() to obtain the data. */ PARSER_CONTEXT * -parser_init_byteStream(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain) +parser_init_byteStream(u64 addr, u32 bytes, int isLocal, int *tryAgain) { - return parser_init_guts(addr, bytes, isLocal, FALSE, tryAgain); + return parser_init_guts(addr, bytes, isLocal, 0, tryAgain); } /* Obtain '\0'-terminated copy of string in payload area. diff --git a/drivers/staging/unisys/visorchipset/parser.h b/drivers/staging/unisys/visorchipset/parser.h index 9fbe3b5..fceb1ef 100644 --- a/drivers/staging/unisys/visorchipset/parser.h +++ b/drivers/staging/unisys/visorchipset/parser.h @@ -33,9 +33,9 @@ typedef enum { typedef struct PARSER_CONTEXT_Tag PARSER_CONTEXT; -PARSER_CONTEXT *parser_init(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain); -PARSER_CONTEXT *parser_init_byteStream(u64 addr, u32 bytes, BOOL isLocal, - BOOL *tryAgain); +PARSER_CONTEXT *parser_init(u64 addr, u32 bytes, int isLocal, int *tryAgain); +PARSER_CONTEXT *parser_init_byteStream(u64 addr, u32 bytes, int isLocal, + int *tryAgain); void parser_param_start(PARSER_CONTEXT *ctx, PARSER_WHICH_STRING which_string); void *parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize); void *parser_string_get(PARSER_CONTEXT *ctx); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 29/30] staging: unisys: iochannel.h pragma
From: Jeffrey Brown Replaced pragma code surrounding multiple structs at once with __packed statements for each struct Signed-off-by: Jeffrey Brown Signed-off-by: Benjamin Romer --- .../common-spar/include/channels/iochannel.h | 47 +- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/channels/iochannel.h b/drivers/staging/unisys/common-spar/include/channels/iochannel.h index eb7efe4..719422b 100644 --- a/drivers/staging/unisys/common-spar/include/channels/iochannel.h +++ b/drivers/staging/unisys/common-spar/include/channels/iochannel.h @@ -223,18 +223,10 @@ enum vdisk_mgmt_types { * NUMSIGNALS to prevent queue full deadlocks */ #define MAX_NET_RCV_BUFS (MIN_NUMSIGNALS / 2) -/* - * structs with pragma pack */ - -/* / BEGIN PRAGMA PACK PUSH 1 / */ -/* / ONLY STRUCT TYPE SHOULD BE BELOW */ - -#pragma pack(push, 1) - struct guest_phys_info { u64 address; u64 length; -}; +} __packed; #define GPI_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof(struct guest_phys_info)) @@ -242,12 +234,12 @@ struct uisscsi_dest { u32 channel;/* channel == bus number */ u32 id; /* id == target number */ u32 lun;/* lun == logical unit number */ -}; +} __packed; struct vhba_wwnn { u32 wwnn1; u32 wwnn2; -}; +} __packed; /* WARNING: Values stired in this structure must contain maximum counts (not * maximum values). */ @@ -264,7 +256,7 @@ struct vhba_config_max {/* 20 bytes */ * bus */ /* max io size is often determined by the resource of the hba. e.g */ /* max scatter gather list length * page size / sector size */ -}; +} __packed; struct uiscmdrsp_scsi { void *scsicmd; /* the handle to the cmd that was received - @@ -307,7 +299,7 @@ struct uiscmdrsp_scsi { /* scsi.addlstat is 0 */ /* scsi.linuxstat is SAM_STAT_GOOD */ /* That is, there is NO error. */ -}; +} __packed; /* * Defines to support sending correct inquiry result when no disk is @@ -425,7 +417,7 @@ struct sense_data { u8 additional_sense_code_qualifier; u8 fru_code; u8 sense_key_specific[3]; -}; +} __packed; /* some SCSI ADSENSE codes */ #ifndef SCSI_ADSENSE_LUN_NOT_READY @@ -484,13 +476,13 @@ struct net_pkt_xmt { * guest memory to get to the header. uisnic needs ethhdr to * determine how to route the packet. */ -}; +} __packed; struct net_pkt_xmtdone { u32 xmt_done_result;/* result of NET_XMIT */ #define XMIT_SUCCESS 0 #define XMIT_FAILED 1 -}; +} __packed; /* RCVPOST_BUF_SIZe must be at most page_size(4096) - cache_line_size (64) The * reason is because dev_skb_alloc which is used to generate RCV_POST skbs in @@ -511,7 +503,7 @@ struct net_pkt_rcvpost { u64 unique_num; /* This is used to make sure that * receive posts are returned to */ /* the Adapter which sent them origonally. */ -}; +} __packed; struct net_pkt_rcv { /* the number of receive buffers that can be chained */ @@ -525,17 +517,17 @@ struct net_pkt_rcv { /* NOTE: first rcvbuf in the chain will also be provided in net.buf. */ u64 unique_num; u32 rcvs_dropped_delta; -}; +} __packed; struct net_pkt_enbdis { void *context; u16 enable; /* 1 = enable, 0 = disable */ -}; +} __packed; struct net_pkt_macaddr { void *context; u8 macaddr[MAX_MACADDR_LEN];/* 6 bytes */ -}; +} __packed; /* cmd rsp packet used for VNIC network traffic */ struct uiscmdrsp_net { @@ -552,7 +544,7 @@ struct uiscmdrsp_net { /* and NET_CONNECT_STATUS */ struct net_pkt_macaddr macaddr; }; -}; +} __packed; struct uiscmdrsp_scsitaskmgmt { enum task_mgmt_types tasktype; @@ -587,7 +579,7 @@ struct uiscmdrsp_scsitaskmgmt { /* result of taskmgmt command - set by IOPart - values are: */ #define TASK_MGMT_FAILED 0 #define TASK_MGMT_SUCCESS 1 -}; +} __packed; /* The following is used by uissd to send disk add/remove notifications to * Guest */ @@ -597,7 +589,7 @@ struct uiscmdrsp_disknotify { void *v_hba;/* Pointer to vhba_info for channel info to * route msg */ u32 channel, id, lun; /* SCSI Path of Disk to added or removed */ -}; +} __packed; /* The following is used by virthba/vSCSI to send the Acquire/Release commands * to the IOVM. */ @@ -634,7 +626,7 @@ struct uiscmdrsp_vdiskmgmt { /* result of taskmgmt command - set by IOPart - values are: */ #define VDISK_MGMT_FAILED 0 #define VDISK_MGMT_SUCCESS 1 -}; +} __packed; /* keeping cmd & rsp info in one structure for now cmd rsp packet for scsi */ struct u
[PATCH 27/30] staging: unisys: vmcall_channel_version_mismatch
From: Jeffrey Brown Replaced "pragma pack(push, 1)" and "pragma pack(pop)" with __packed Signed-off-by: Jeffrey Brown Signed-off-by: Benjamin Romer --- drivers/staging/unisys/common-spar/include/vmcallinterface.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/vmcallinterface.h b/drivers/staging/unisys/common-spar/include/vmcallinterface.h index 8373f80..a6d9619 100644 --- a/drivers/staging/unisys/common-spar/include/vmcallinterface.h +++ b/drivers/staging/unisys/common-spar/include/vmcallinterface.h @@ -123,19 +123,14 @@ struct vmcall_io_diag_addr_params { u64 address;/* contents provided by this VMCALL (OUT) */ } __packed; -/* / BEGIN PRAGMA PACK PUSH 1 / */ /* / ONLY STRUCT TYPE SHOULD BE BELOW */ -#pragma pack(push, 1) /* Parameters to VMCALL_IO_VISORSERIAL_ADDR interface */ struct vmcall_io_visorserial_addr_params { /* The Guest-relative physical address of the serial console * channel. This VMCall fills this in with the appropriate * address. */ u64 address;/* contents provided by this VMCALL (OUT) */ -}; - -#pragma pack(pop) -/* / END PRAGMA PACK PUSH 1 /// */ +} __packed; /* Parameters to VMCALL_CHANNEL_MISMATCH interface */ struct vmcall_channel_version_mismatch_params { -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/30] staging: unisys: changes sig_read_header function from bool to int
From: Erik Arfvidson This patch changes function sig_read_header return value from bool to int Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c index 0279e1f..3c13276 100644 --- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c +++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c @@ -318,11 +318,11 @@ EXPORT_SYMBOL_GPL(visorchannel_get_header); &((sig_hdr)->FIELD), \ sizeof((sig_hdr)->FIELD)) >= 0) -static BOOL +static int sig_read_header(struct visorchannel *channel, u32 queue, struct signal_queue_header *sig_hdr) { - BOOL rc = FALSE; + int rc = 0; if (channel->chan_hdr.ch_space_offset < sizeof(struct channel_header)) { ERRDRV("oChannelSpace too small: (status=%d)\n", rc); @@ -341,7 +341,7 @@ sig_read_header(struct visorchannel *channel, u32 queue, rc); goto cleanup; } - rc = TRUE; + rc = 1; cleanup: return rc; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/30] staging: unisys: change uislib.c variables from type bool to int
From: Erik Arfvidson this patch changes uislib.c variables from type bool to int Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/uislib/uislib.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c index a9eedde..a5d25c8 100644 --- a/drivers/staging/unisys/uislib/uislib.c +++ b/drivers/staging/unisys/uislib/uislib.c @@ -78,7 +78,7 @@ static u64 phys_data_chan; static int platform_no; static struct uisthread_info incoming_ti; -static BOOL incoming_started = FALSE; +static int incoming_started; static LIST_HEAD(poll_dev_chan); static unsigned long long tot_moved_to_tail_cnt; static unsigned long long tot_wait_cnt; @@ -1339,18 +1339,18 @@ static int process_incoming(void *v) complete_and_exit(&incoming_ti.has_stopped, 0); } -static BOOL +static int initialize_incoming_thread(void) { if (incoming_started) - return TRUE; + return 1; if (!uisthread_start(&incoming_ti, &process_incoming, NULL, "dev_incoming")) { LOGERR("uisthread_start initialize_incoming_thread FAILED"); - return FALSE; + return 0; } - incoming_started = TRUE; - return TRUE; + incoming_started = 1; + return 1; } /* Add a new device/channel to the list being processed by @@ -1376,7 +1376,7 @@ uislib_enable_channel_interrupts(u32 bus_no, u32 dev_no, initialize_incoming_thread(); dev->interrupt = interrupt; dev->interrupt_context = interrupt_context; - dev->polling = TRUE; + dev->polling = 1; list_add_tail(&dev->list_polling_device_channels, &poll_dev_chan); up(&poll_dev_lock); @@ -1399,7 +1399,7 @@ uislib_disable_channel_interrupts(u32 bus_no, u32 dev_no) } down(&poll_dev_lock); list_del(&dev->list_polling_device_channels); - dev->polling = FALSE; + dev->polling = 0; dev->interrupt = NULL; up(&poll_dev_lock); } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/30] staging: unisys: change serverchangingstate variable bool to int
From: Erik Arfvidson This patch changes serverchangingstate variable from bool to int Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/virthba/virthba.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c index 481fb57..4d4ad8b 100644 --- a/drivers/staging/unisys/virthba/virthba.c +++ b/drivers/staging/unisys/virthba/virthba.c @@ -184,7 +184,7 @@ struct virthba_info { free slot here */ spinlock_t privlock; int serverdown; - bool serverchangingstate; + int serverchangingstate; unsigned long long acquire_failed_cnt; unsigned long long interrupts_rcvd; unsigned long long interrupts_notme; @@ -567,7 +567,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id) spin_lock_init(&virthbainfo->privlock); memset(&virthbainfo->pending, 0, sizeof(virthbainfo->pending)); virthbainfo->serverdown = 0; - virthbainfo->serverchangingstate = false; + virthbainfo->serverchangingstate = 0; virthbainfo->intr = virtpcidev->intr; /* save of host within virthba_info */ @@ -1496,7 +1496,7 @@ virthba_serverup(struct virtpci_dev *virtpcidev) return 0; } - virthbainfo->serverchangingstate = true; + virthbainfo->serverchangingstate = 1; /* Must transition channel to ATTACHED state BEFORE we * can start using the device again */ @@ -1512,7 +1512,7 @@ virthba_serverup(struct virtpci_dev *virtpcidev) return 0; } virthbainfo->serverdown = 0; - virthbainfo->serverchangingstate = false; + virthbainfo->serverchangingstate = 0; return 1; } @@ -1578,7 +1578,7 @@ virthba_serverdown_complete(struct work_struct *work) DBGINF("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no, virtpcidev->device_no); virthbainfo->serverdown = 1; - virthbainfo->serverchangingstate = false; + virthbainfo->serverchangingstate = 0; /* Return the ServerDown response to Command */ visorchipset_device_pause_response(virtpcidev->bus_no, virtpcidev->device_no, 0); @@ -1599,7 +1599,7 @@ virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state) virtpcidev->device_no); if (!virthbainfo->serverdown && !virthbainfo->serverchangingstate) { - virthbainfo->serverchangingstate = true; + virthbainfo->serverchangingstate = 1; queue_work(virthba_serverdown_workqueue, &virthbainfo->serverdown_completion); } else if (virthbainfo->serverchangingstate) { -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 26/30] staging: unisys: vmcall_io_diag_addr_params pragma
From: Jeffrey Brown Removed pragma code in vmacallinterface.h for the struct vmcall_io_diag_addr_params, and put __packed in place of it Signed-off-by: Jeffrey Brown Signed-off-by: Benjamin Romer --- drivers/staging/unisys/common-spar/include/vmcallinterface.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/vmcallinterface.h b/drivers/staging/unisys/common-spar/include/vmcallinterface.h index f076336..8373f80 100644 --- a/drivers/staging/unisys/common-spar/include/vmcallinterface.h +++ b/drivers/staging/unisys/common-spar/include/vmcallinterface.h @@ -115,18 +115,13 @@ struct vmcall_io_controlvm_addr_params { u8 unused[4]; /* Unused Bytes in the 64-Bit Aligned Struct */ } __packed; -/* / BEGIN PRAGMA PACK PUSH 1 / */ /* / ONLY STRUCT TYPE SHOULD BE BELOW */ -#pragma pack(push, 1) /* Parameters to VMCALL_IO_DIAG_ADDR interface */ struct vmcall_io_diag_addr_params { /* The Guest-relative physical address of the diagnostic channel. * This VMCall fills this in with the appropriate address. */ u64 address;/* contents provided by this VMCALL (OUT) */ -}; - -#pragma pack(pop) -/* / END PRAGMA PACK PUSH 1 /// */ +} __packed; /* / BEGIN PRAGMA PACK PUSH 1 / */ /* / ONLY STRUCT TYPE SHOULD BE BELOW */ -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/30] staging: unisys: fix function visorchannel_signalremove from bool to int
From: Erik Arfvidson this patch changes visorchannel_signalremove from bool to int. Also modified signalremove_inner since the return value was bool and change it to int. Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorchannel/visorchannel.h | 2 +- .../staging/unisys/visorchannel/visorchannel_funcs.c | 18 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/unisys/visorchannel/visorchannel.h b/drivers/staging/unisys/visorchannel/visorchannel.h index 63f1b97..5b4ff15 100644 --- a/drivers/staging/unisys/visorchannel/visorchannel.h +++ b/drivers/staging/unisys/visorchannel/visorchannel.h @@ -52,7 +52,7 @@ int visorchannel_write(struct visorchannel *channel, ulong offset, void *local, ulong nbytes); int visorchannel_clear(struct visorchannel *channel, ulong offset, u8 ch, ulong nbytes); -BOOL visorchannel_signalremove(struct visorchannel *channel, u32 queue, +int visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg); BOOL visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg); diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c index 0188ef8..68befd6 100644 --- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c +++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c @@ -411,21 +411,21 @@ safe_sig_queue_validate(struct signal_queue_header *psafe_sqh, return 1; } /* end safe_sig_queue_validate */ -static BOOL +static int signalremove_inner(struct visorchannel *channel, u32 queue, void *msg) { struct signal_queue_header sig_hdr; if (!sig_read_header(channel, queue, &sig_hdr)) { - return FALSE; + return 0; } if (sig_hdr.head == sig_hdr.tail) - return FALSE; /* no signals to remove */ + return 0; /* no signals to remove */ sig_hdr.tail = (sig_hdr.tail + 1) % sig_hdr.max_slots; if (!sig_read_data(channel, queue, &sig_hdr, sig_hdr.tail, msg)) { ERRDRV("sig_read_data failed\n"); - return FALSE; + return 0; } sig_hdr.num_received++; @@ -435,19 +435,19 @@ signalremove_inner(struct visorchannel *channel, u32 queue, void *msg) mb(); /* required for channel synch */ if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, tail)) { ERRDRV("visor_memregion_write of Tail failed\n"); - return FALSE; + return 0; } if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_received)) { ERRDRV("visor_memregion_write of NumSignalsReceived failed\n"); - return FALSE; + return 0; } - return TRUE; + return 1; } -BOOL +int visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg) { - BOOL rc; + int rc; if (channel->needs_lock) { spin_lock(&channel->remove_lock); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 20/30] staging: unisys: remove goto from sig_do_data()
The gotos in this function are unnecessary, so just return. Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c index 4f25d9b..73dd54b 100644 --- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c +++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c @@ -346,28 +346,23 @@ sig_do_data(struct visorchannel *channel, u32 queue, struct signal_queue_header *sig_hdr, u32 slot, void *data, int is_write) { - int rc = 0; int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue, sig_hdr, slot); if (is_write) { if (visor_memregion_write(channel->memregion, signal_data_offset, data, sig_hdr->signal_size) < 0) { - ERRDRV("visor_memregion_write of signal data failed: (status=%d)\n", - rc); - goto cleanup; + ERRDRV("visor_memregion_write of signal data failed"); + return 0; } } else { if (visor_memregion_read(channel->memregion, signal_data_offset, data, sig_hdr->signal_size) < 0) { - ERRDRV("visor_memregion_read of signal data failed: (status=%d)\n", - rc); - goto cleanup; + ERRDRV("visor_memregion_read of signal data failed"); + return 0; } } - rc = 1; -cleanup: - return rc; + return 0; } static inline int -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 24/30] staging: unisys: vmcallintferace phys_info pragma
From: Jeffrey Brown Changed pragma code surrounding the struct phys_info with a __packed statement Signed-off-by: Jeffrey Brown Signed-off-by: Benjamin Romer --- drivers/staging/unisys/common-spar/include/vmcallinterface.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/vmcallinterface.h b/drivers/staging/unisys/common-spar/include/vmcallinterface.h index 7833371..3a2af50 100644 --- a/drivers/staging/unisys/common-spar/include/vmcallinterface.h +++ b/drivers/staging/unisys/common-spar/include/vmcallinterface.h @@ -96,17 +96,12 @@ do { \ /* Structures for IO VMCALLs */ -/* / BEGIN PRAGMA PACK PUSH 1 / */ /* / ONLY STRUCT TYPE SHOULD BE BELOW */ -#pragma pack(push, 1) struct phys_info { u64 pi_pfn; u16 pi_off; u16 pi_len; -}; - -#pragma pack(pop) -/* / END PRAGMA PACK PUSH 1 /// */ +} __packed; /* / BEGIN PRAGMA PACK PUSH 1 / */ /* / ONLY STRUCT TYPE SHOULD BE BELOW */ -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 00/30] staging: unisys: cleanup patch series
This set of patches cleans up some more of the code by eliminating unnecessary goto statements, getting rid of the BOOL define and switching over code that used it to use int instead, and switching from using pragma(pack) to __packed. *** BLURB HERE *** Benjamin Romer (3): staging: unisys: remove goto from sig_do_data() staging: unisys: remove unnecessary goto in parser_param_start() staging: unisys: Remove unnecessary gotos from info_debugfs_read_helper Erik Arfvidson (19): staging: unisys: serverdown variable change bool to int virthba staging: unisys: change serverchangingstate variable bool to int staging: unisys: change bool to int variable found staging: unisys: change variable registered from bool to int staging: unisys: fix function visorchannel_signalremove from bool to int staging: unisys: changes function visorchannel_signalinsert from bool to int staging: unisys: changes sig_read_header function from bool to int staging: unisys: changes needs_lock from bool to int staging: unisys: changes bool to int in sig related function staging: unisys: change periodic_work.[ch] functions from bool to int staging: unisys: changes visorchipset.[ch] functions from bool to int staging: unisys: change visorchipset/parse.[ch] from bool to int staging: unisys: change charqueue.[ch] variables from bool to int staging: unisys: remove #define bool in visorchannel.h staging: unisys: change memregion_direct.c variables type bool to int. staging: unisys: change visorchannel_funcs.c function variable from bool to int staging: unisys: change visorkmodutils.c variable from bool to int. staging: unisys: change uislib.c variables from type bool to int staging: unisys: remove #definition from timskmod.h Jeffrey Brown (8): staging: unisys: vbusdeviceinfo pragma staging: unisys: vmcallintferace phys_info pragma staging: unisys: vmcall_io_controlvm_addr_params pragma staging: unisys: vmcall_io_diag_addr_params pragma staging: unisys: vmcall_channel_version_mismatch staging: unisys: channel.h pragma staging: unisys: iochannel.h pragma staging: unisys: vbuschannel.h pragma .../unisys/common-spar/include/channels/channel.h | 7 +- .../common-spar/include/channels/iochannel.h | 47 -- .../common-spar/include/channels/vbuschannel.h | 7 +- .../unisys/common-spar/include/vbusdeviceinfo.h| 6 +- .../unisys/common-spar/include/vmcallinterface.h | 28 +- drivers/staging/unisys/include/periodic_work.h | 6 +- drivers/staging/unisys/include/timskmod.h | 5 - drivers/staging/unisys/uislib/uislib.c | 29 +++--- drivers/staging/unisys/virthba/virthba.c | 20 ++-- drivers/staging/unisys/virtpci/virtpci.c | 8 +- drivers/staging/unisys/visorchannel/visorchannel.h | 7 +- .../unisys/visorchannel/visorchannel_funcs.c | 94 +-- drivers/staging/unisys/visorchipset/file.c | 8 +- drivers/staging/unisys/visorchipset/parser.c | 29 +++--- drivers/staging/unisys/visorchipset/parser.h | 6 +- drivers/staging/unisys/visorchipset/visorchipset.h | 10 +- .../unisys/visorchipset/visorchipset_main.c| 102 ++--- drivers/staging/unisys/visorutil/charqueue.c | 4 +- drivers/staging/unisys/visorutil/charqueue.h | 2 +- .../staging/unisys/visorutil/memregion_direct.c| 30 +++--- drivers/staging/unisys/visorutil/periodic_work.c | 52 +-- drivers/staging/unisys/visorutil/visorkmodutils.c | 2 +- 22 files changed, 223 insertions(+), 286 deletions(-) -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 17/30] staging: unisys: change visorkmodutils.c variable from bool to int.
From: Erik Arfvidson this patch changes the value of variable unisys_spar_plataform from bool to int. Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorutil/visorkmodutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/visorutil/visorkmodutils.c b/drivers/staging/unisys/visorutil/visorkmodutils.c index 556e264..f3f1839 100644 --- a/drivers/staging/unisys/visorutil/visorkmodutils.c +++ b/drivers/staging/unisys/visorutil/visorkmodutils.c @@ -54,7 +54,7 @@ static __init uint32_t visorutil_spar_detect(void) static __init int visorutil_mod_init(void) { if (visorutil_spar_detect()) { - unisys_spar_platform = TRUE; + unisys_spar_platform = 1; return 0; } else { return -ENODEV; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/30] staging: unisys: serverdown variable change bool to int virthba
From: Erik Arfvidson This patch changes serverdown variable to int instead of bool Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/virthba/virthba.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c index e6ecea5..481fb57 100644 --- a/drivers/staging/unisys/virthba/virthba.c +++ b/drivers/staging/unisys/virthba/virthba.c @@ -183,7 +183,7 @@ struct virthba_info { unsigned int nextinsert;/* Start search for next pending free slot here */ spinlock_t privlock; - bool serverdown; + int serverdown; bool serverchangingstate; unsigned long long acquire_failed_cnt; unsigned long long interrupts_rcvd; @@ -566,7 +566,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id) init_waitqueue_head(&virthbainfo->rsp_queue); spin_lock_init(&virthbainfo->privlock); memset(&virthbainfo->pending, 0, sizeof(virthbainfo->pending)); - virthbainfo->serverdown = false; + virthbainfo->serverdown = 0; virthbainfo->serverchangingstate = false; virthbainfo->intr = virtpcidev->intr; @@ -1511,7 +1511,7 @@ virthba_serverup(struct virtpci_dev *virtpcidev) LOGERR("uisthread_start rsp FAILED\n"); return 0; } - virthbainfo->serverdown = false; + virthbainfo->serverdown = 0; virthbainfo->serverchangingstate = false; return 1; @@ -1577,7 +1577,7 @@ virthba_serverdown_complete(struct work_struct *work) DBGINF("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no, virtpcidev->device_no); - virthbainfo->serverdown = true; + virthbainfo->serverdown = 1; virthbainfo->serverchangingstate = false; /* Return the ServerDown response to Command */ visorchipset_device_pause_response(virtpcidev->bus_no, -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [RFC PATCH 0/5] unisys: kthread cleanup
On Mon, 2015-01-26 at 00:39 -0500, devendra.aaru wrote: > Hello, > > Sorry for the late reply. > > Would reverting last two patches help ? > > Thanks, > Devendra Devendra, I am really sorry for how long this is taking. I don't think that there's anything wrong with your patches, but rather that something else that was changed recently is causing it not to boot on s-Par. Taking the last two out didn't make any difference so I don't think these are causing the problem. If you don't mind, I'd like to take these patches and hang on to them until I find and fix the problem and then I will resubmit them with my sign-off. Is that okay? :) -- Ben Romer | Software Engineer | Virtual Systems Development Unisys Corporation | 2476 Swedesford Rd | Malvern, PA 19355 | 610-648-7140 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] staging: panel: register driver after checking device
On Tue, Feb 10, 2015 at 05:26:02PM +0530, Sudip Mukherjee wrote: > register the driver only if lcd or keypad has been enabled and if > both are disabled then just exit. > > Signed-off-by: Sudip Mukherjee Acked-by: Willy Tarreau Willy ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/2] staging: panel: initialize lcd if lcd enabled
On Tue, Feb 10, 2015 at 05:26:03PM +0530, Sudip Mukherjee wrote: > initialiaze lcd parameters only if lcd is enabled. > > Signed-off-by: Sudip Mukherjee One minor comment below (cosmetic), but after this it's OK. Acked-by: Willy Tarreau > + if (lcd.enabled) { > + /* > + * Init lcd struct with load-time values to preserve exact > + * current functionality (at least for now). > + */ > + lcd.height = lcd_height; > + lcd.width = lcd_width; > + lcd.bwidth = lcd_bwidth; > + lcd.hwidth = lcd_hwidth; > + lcd.charset = lcd_charset; > + lcd.proto = lcd_proto; > + lcd.pins.e = lcd_e_pin; > + lcd.pins.rs = lcd_rs_pin; > + lcd.pins.rw = lcd_rw_pin; > + lcd.pins.cl = lcd_cl_pin; > + lcd.pins.da = lcd_da_pin; > + lcd.pins.bl = lcd_bl_pin; > + > + /* Leave it for now, just in case */ ^^^ Please fix indenting the comment here. > + lcd.esc_seq.len = -1; > + } > + Willy ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 21/30] staging: unisys: remove unnecessary goto in parser_param_start()
The goto isn't necessary here so replace it with a simple return statement. Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorchipset/parser.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 2f997af..3678d39 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -217,7 +217,7 @@ parser_param_start(PARSER_CONTEXT *ctx, PARSER_WHICH_STRING which_string) if (ctx == NULL) { ERRDRV("%s (%s:%d) - no context", __func__, __FILE__, __LINE__); - goto Away; + return; } phdr = (struct spar_controlvm_parameters_header *)(ctx->data); switch (which_string) { @@ -241,9 +241,6 @@ parser_param_start(PARSER_CONTEXT *ctx, PARSER_WHICH_STRING which_string) ERRDRV("%s - bad which_string %d", __func__, which_string); break; } - -Away: - return; } void -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/30] staging: unisys: remove #definition from timskmod.h
From: Erik Arfvidson this patch removes #definitions from timksmod.h Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/include/timskmod.h| 5 - drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 15 +-- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/staging/unisys/include/timskmod.h b/drivers/staging/unisys/include/timskmod.h index 4019a0d..bd36ef8 100644 --- a/drivers/staging/unisys/include/timskmod.h +++ b/drivers/staging/unisys/include/timskmod.h @@ -53,11 +53,6 @@ #include /* #define DEBUG */ -#ifndef BOOL -#define BOOLint -#endif -#define FALSE 0 -#define TRUE1 #if !defined SUCCESS #define SUCCESS 0 #endif diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c index 8def9c2..4f25d9b 100644 --- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c +++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c @@ -322,11 +322,9 @@ static int sig_read_header(struct visorchannel *channel, u32 queue, struct signal_queue_header *sig_hdr) { - int rc = 0; - if (channel->chan_hdr.ch_space_offset < sizeof(struct channel_header)) { - ERRDRV("oChannelSpace too small: (status=%d)\n", rc); - goto cleanup; + ERRDRV("oChannelSpace too small\n"); + return 0; } /* Read the appropriate SIGNAL_QUEUE_HEADER into local memory. */ @@ -337,13 +335,10 @@ sig_read_header(struct visorchannel *channel, u32 queue, sizeof(struct signal_queue_header)) < 0) { ERRDRV("queue=%d SIG_QUEUE_OFFSET=%d", queue, (int)SIG_QUEUE_OFFSET(&channel->chan_hdr, queue)); - ERRDRV("visor_memregion_read of signal queue failed: (status=%d)\n", - rc); - goto cleanup; + ERRDRV("visor_memregion_read of signal queue failed\n"); + return 0; } - rc = 1; -cleanup: - return rc; + return 1; } static int -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 25/30] staging: unisys: vmcall_io_controlvm_addr_params pragma
From: Jeffrey Brown Replaced pragma code for the struct vmcall_io_controlvm_addr_params with __packed Signed-off-by: Jeffrey Brown Signed-off-by: Benjamin Romer --- drivers/staging/unisys/common-spar/include/vmcallinterface.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/vmcallinterface.h b/drivers/staging/unisys/common-spar/include/vmcallinterface.h index 3a2af50..f076336 100644 --- a/drivers/staging/unisys/common-spar/include/vmcallinterface.h +++ b/drivers/staging/unisys/common-spar/include/vmcallinterface.h @@ -103,9 +103,7 @@ struct phys_info { u16 pi_len; } __packed; -/* / BEGIN PRAGMA PACK PUSH 1 / */ /* / ONLY STRUCT TYPE SHOULD BE BELOW */ -#pragma pack(push, 1) /* Parameters to VMCALL_IO_CONTROLVM_ADDR interface */ struct vmcall_io_controlvm_addr_params { /* The Guest-relative physical address of the ControlVm channel. @@ -115,10 +113,7 @@ struct vmcall_io_controlvm_addr_params { * in with the appropriate address. */ u32 channel_bytes; /* contents provided by this VMCALL (OUT) */ u8 unused[4]; /* Unused Bytes in the 64-Bit Aligned Struct */ -}; - -#pragma pack(pop) -/* / END PRAGMA PACK PUSH 1 /// */ +} __packed; /* / BEGIN PRAGMA PACK PUSH 1 / */ /* / ONLY STRUCT TYPE SHOULD BE BELOW */ -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 23/30] staging: unisys: vbusdeviceinfo pragma
From: Jeffrey Brown Replaced pragma code in vbusdeviceinfo.h with __packed for the struct ultra_vbus_deviceinfo Signed-off-by: Jeffrey Brown Signed-off-by: Benjamin Romer --- drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h b/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h index 9b6d3e6..9a51f5f 100644 --- a/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h +++ b/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h @@ -18,8 +18,6 @@ #include -#pragma pack(push, 1) /* both GCC and VC now allow this pragma */ - /* An array of this struct is present in the channel area for each vbus. * (See vbuschannel.h.) * It is filled in by the client side to provide info about the device @@ -31,9 +29,7 @@ struct ultra_vbus_deviceinfo { u8 infostrs[96];/* sequence of tab-delimited id strings: */ /**/ u8 reserved[128]; /* pad size to 256 bytes */ -}; - -#pragma pack(pop) +} __packed; /* Reads chars from the buffer at for bytes, and writes to * the buffer at , which is bytes long, ensuring never to -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 22/30] staging: unisys: Remove unnecessary gotos from info_debugfs_read_helper
Get rid of all the useless gotos in info_debugfs_read_helper() and just return the correct values straight away. Signed-off-by: Benjamin Romer --- drivers/staging/unisys/uislib/uislib.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c index a5d25c8..f0abb92 100644 --- a/drivers/staging/unisys/uislib/uislib.c +++ b/drivers/staging/unisys/uislib/uislib.c @@ -1103,7 +1103,7 @@ info_debugfs_read_helper(char **buff, int *buff_len) struct bus_info *bus; if (PLINE("\nBuses:\n") < 0) - goto err_done; + return -1; read_lock(&bus_list_lock); for (bus = bus_list; bus; bus = bus->next) { @@ -1134,23 +1134,22 @@ info_debugfs_read_helper(char **buff, int *buff_len) if (PLINE("UisUtils_Registered_Services: %d\n", atomic_read(&uisutils_registered_services)) < 0) - goto err_done; + return -1; if (PLINE("cycles_before_wait %llu wait_cycles:%llu\n", cycles_before_wait, wait_cycles) < 0) - goto err_done; + return -1; if (PLINE("tot_wakeup_cnt %llu:tot_wait_cnt %llu:tot_schedule_cnt %llu\n", tot_wakeup_cnt, tot_wait_cnt, tot_schedule_cnt) < 0) - goto err_done; + return -1; if (PLINE("en_smart_wakeup %d\n", en_smart_wakeup) < 0) - goto err_done; + return -1; if (PLINE("tot_moved_to_tail_cnt %llu\n", tot_moved_to_tail_cnt) < 0) - goto err_done; + return -1; return tot; err_done_unlock: read_unlock(&bus_list_lock); -err_done: return -1; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/30] staging: unisys: change variable registered from bool to int
From: Erik Arfvidson this patch changes variable registered from bool to int Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorchipset/file.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c index e51fd4e..0e1bb93 100644 --- a/drivers/staging/unisys/visorchipset/file.c +++ b/drivers/staging/unisys/visorchipset/file.c @@ -31,7 +31,7 @@ static struct cdev file_cdev; static struct visorchannel **file_controlvm_channel; static dev_t majordev = -1; /**< indicates major num for device */ -static BOOL registered = FALSE; +static int registered; static int visorchipset_open(struct inode *inode, struct file *file); static int visorchipset_release(struct inode *inode, struct file *file); @@ -64,7 +64,7 @@ visorchipset_file_init(dev_t major_dev, struct visorchannel **controlvm_channel) MYDRVNAME); return -1; } - registered = TRUE; + registered = 1; INFODRV("New major number %d registered\n", MAJOR(majordev)); } else { /* static major device number registration required */ @@ -72,7 +72,7 @@ visorchipset_file_init(dev_t major_dev, struct visorchannel **controlvm_channel) ERRDRV("Unable to register char device %s", MYDRVNAME); return -1; } - registered = TRUE; + registered = 1; INFODRV("Static major number %d registered\n", MAJOR(majordev)); } rc = cdev_add(&file_cdev, MKDEV(MAJOR(majordev), 0), 1); @@ -96,7 +96,7 @@ visorchipset_file_cleanup(void) unregister_chrdev_region(majordev, 1); majordev = MKDEV(0, 0); } - registered = FALSE; + registered = 0; } } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/30] staging: unisys: change periodic_work.[ch] functions from bool to int
From: Erik Arfvidson This patch changes the following functions from bool to int: visor_periodic_work_nextperiod visor_periodic_work_destroy visor_periodic_work_stop visor_periodic_work_start Also change struct periodic_work variables from bool to int Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/include/periodic_work.h | 6 +-- drivers/staging/unisys/visorutil/periodic_work.c | 52 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/drivers/staging/unisys/include/periodic_work.h b/drivers/staging/unisys/include/periodic_work.h index 26ec10b..63008c6 100644 --- a/drivers/staging/unisys/include/periodic_work.h +++ b/drivers/staging/unisys/include/periodic_work.h @@ -31,8 +31,8 @@ struct periodic_work *visor_periodic_work_create(ulong jiffy_interval, void *workfuncarg, const char *devnam); void visor_periodic_work_destroy(struct periodic_work *pw); -BOOL visor_periodic_work_nextperiod(struct periodic_work *pw); -BOOL visor_periodic_work_start(struct periodic_work *pw); -BOOL visor_periodic_work_stop(struct periodic_work *pw); +int visor_periodic_work_nextperiod(struct periodic_work *pw); +int visor_periodic_work_start(struct periodic_work *pw); +int visor_periodic_work_stop(struct periodic_work *pw); #endif diff --git a/drivers/staging/unisys/visorutil/periodic_work.c b/drivers/staging/unisys/visorutil/periodic_work.c index 0908bf9..cde3b37 100644 --- a/drivers/staging/unisys/visorutil/periodic_work.c +++ b/drivers/staging/unisys/visorutil/periodic_work.c @@ -30,8 +30,8 @@ struct periodic_work { struct delayed_work work; void (*workfunc)(void *); void *workfuncarg; - BOOL is_scheduled; - BOOL want_to_stop; + int is_scheduled; + int want_to_stop; ulong jiffy_interval; struct workqueue_struct *workqueue; const char *devnam; @@ -75,68 +75,68 @@ EXPORT_SYMBOL_GPL(visor_periodic_work_destroy); /** Call this from your periodic work worker function to schedule the next * call. - * If this function returns FALSE, there was a failure and the + * If this function returns 0, there was a failure and the * periodic work is no longer scheduled */ -BOOL visor_periodic_work_nextperiod(struct periodic_work *pw) +int visor_periodic_work_nextperiod(struct periodic_work *pw) { - BOOL rc = FALSE; + int rc = 0; write_lock(&pw->lock); if (pw->want_to_stop) { - pw->is_scheduled = FALSE; - pw->want_to_stop = FALSE; - rc = TRUE; /* yes, TRUE; see visor_periodic_work_stop() */ + pw->is_scheduled = 0; + pw->want_to_stop = 0; + rc = 1; /* yes, TRUE; see visor_periodic_work_stop() */ goto unlock; } else if (queue_delayed_work(pw->workqueue, &pw->work, pw->jiffy_interval) < 0) { ERRDEV(pw->devnam, "queue_delayed_work failed!"); - pw->is_scheduled = FALSE; - rc = FALSE; + pw->is_scheduled = 0; + rc = 0; goto unlock; } - rc = TRUE; + rc = 1; unlock: write_unlock(&pw->lock); return rc; } EXPORT_SYMBOL_GPL(visor_periodic_work_nextperiod); -/** This function returns TRUE iff new periodic work was actually started. - * If this function returns FALSE, then no work was started +/** This function returns 1 if new periodic work was actually started. + * If this function returns 0, then no work was started * (either because it was already started, or because of a failure). */ -BOOL visor_periodic_work_start(struct periodic_work *pw) +int visor_periodic_work_start(struct periodic_work *pw) { - BOOL rc = FALSE; + int rc = 0; write_lock(&pw->lock); if (pw->is_scheduled) { - rc = FALSE; + rc = 0; goto unlock; } if (pw->want_to_stop) { ERRDEV(pw->devnam, "dev_start_periodic_work failed!"); - rc = FALSE; + rc = 0; goto unlock; } INIT_DELAYED_WORK(&pw->work, &periodic_work_func); if (queue_delayed_work(pw->workqueue, &pw->work, pw->jiffy_interval) < 0) { ERRDEV(pw->devnam, "%s queue_delayed_work failed!", __func__); - rc = FALSE; + rc = 0; goto unlock; } - pw->is_scheduled = TRUE; - rc = TRUE; + pw->is_scheduled = 1; + rc = 1; unlock: write_unlock(&pw->lock); return rc; } EXPORT_SYMBOL_GPL(visor_periodic_work_start); -/** This function returns TRUE iff your call actually stopped the periodic +/** This function returns 1 iff your call actually stopped the pe
[PATCH 28/30] staging: unisys: channel.h pragma
From: Jeffrey Brown Replaced pragma code surrounding the structs signal_queue_header and channel_header with __packed for both of them Signed-off-by: Jeffrey Brown Signed-off-by: Benjamin Romer --- drivers/staging/unisys/common-spar/include/channels/channel.h | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/channels/channel.h b/drivers/staging/unisys/common-spar/include/channels/channel.h index 6fb6e5b..d3b01cb 100644 --- a/drivers/staging/unisys/common-spar/include/channels/channel.h +++ b/drivers/staging/unisys/common-spar/include/channels/channel.h @@ -187,7 +187,6 @@ ULTRA_CHANNELCLI_STRING(u32 v) #define ULTRA_IO_DRIVER_DISABLES_INTS (0x1ULL << 5) #define ULTRA_IO_DRIVER_SUPPORTS_ENHANCED_RCVBUF_CHECKING (0x1ULL << 6) -#pragma pack(push, 1) /* both GCC and VC now allow this pragma */ /* Common Channel Header */ struct channel_header { u64 signature; /* Signature */ @@ -227,7 +226,7 @@ struct channel_header { u8 filler[1]; /* Pad out to 128 byte cacheline */ /* Please add all new single-byte values below here */ u8 recover_channel; -}; +} __packed; #define ULTRA_CHANNEL_ENABLE_INTS (0x1ULL << 0) @@ -265,9 +264,7 @@ struct signal_queue_header { * to denote trouble with client's * fields */ u8 filler[12]; /* Pad out to 64 byte cacheline */ -}; - -#pragma pack(pop) +} __packed; #define spar_signal_init(chan, QHDRFLD, QDATAFLD, QDATATYPE, ver, typ) \ do {\ -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 15/30] staging: unisys: change memregion_direct.c variables type bool to int.
From: Erik Arfvidson This patch changes all variable types bool to int in memregion_direct.c Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- .../staging/unisys/visorutil/memregion_direct.c| 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/unisys/visorutil/memregion_direct.c b/drivers/staging/unisys/visorutil/memregion_direct.c index 33522cc..6487b0e 100644 --- a/drivers/staging/unisys/visorutil/memregion_direct.c +++ b/drivers/staging/unisys/visorutil/memregion_direct.c @@ -30,11 +30,11 @@ struct memregion { HOSTADDRESS physaddr; ulong nbytes; void __iomem *mapped; - BOOL requested; - BOOL overlapped; + int requested; + int overlapped; }; -static BOOL mapit(struct memregion *memregion); +static int mapit(struct memregion *memregion); static void unmapit(struct memregion *memregion); struct memregion * @@ -49,7 +49,7 @@ visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes) } memregion->physaddr = physaddr; memregion->nbytes = nbytes; - memregion->overlapped = FALSE; + memregion->overlapped = 0; if (!mapit(memregion)) { rc = NULL; goto cleanup; @@ -93,31 +93,31 @@ visor_memregion_create_overlapped(struct memregion *parent, ulong offset, memregion->physaddr = parent->physaddr + offset; memregion->nbytes = nbytes; memregion->mapped = ((u8 __iomem *)(parent->mapped)) + offset; - memregion->requested = FALSE; - memregion->overlapped = TRUE; + memregion->requested = 0; + memregion->overlapped = 1; return memregion; } EXPORT_SYMBOL_GPL(visor_memregion_create_overlapped); -static BOOL +static int mapit(struct memregion *memregion) { ulong physaddr = (ulong)(memregion->physaddr); ulong nbytes = memregion->nbytes; - memregion->requested = FALSE; + memregion->requested = 0; if (!request_mem_region(physaddr, nbytes, MYDRVNAME)) ERRDRV("cannot reserve channel memory @0x%lx for 0x%lx-- no big deal", physaddr, nbytes); else - memregion->requested = TRUE; + memregion->requested = 1; memregion->mapped = ioremap_cache(physaddr, nbytes); if (memregion->mapped == NULL) { ERRDRV("cannot ioremap_cache channel memory @0x%lx for 0x%lx", physaddr, nbytes); - return FALSE; + return 0; } - return TRUE; + return 1; } static void @@ -130,7 +130,7 @@ unmapit(struct memregion *memregion) if (memregion->requested) { release_mem_region((ulong)(memregion->physaddr), memregion->nbytes); - memregion->requested = FALSE; + memregion->requested = 0; } } @@ -176,7 +176,7 @@ visor_memregion_resize(struct memregion *memregion, ulong newsize) EXPORT_SYMBOL_GPL(visor_memregion_resize); static int -memregion_readwrite(BOOL is_write, +memregion_readwrite(int is_write, struct memregion *memregion, ulong offset, void *local, ulong nbytes) { @@ -196,7 +196,7 @@ int visor_memregion_read(struct memregion *memregion, ulong offset, void *dest, ulong nbytes) { - return memregion_readwrite(FALSE, memregion, offset, dest, nbytes); + return memregion_readwrite(0, memregion, offset, dest, nbytes); } EXPORT_SYMBOL_GPL(visor_memregion_read); @@ -204,7 +204,7 @@ int visor_memregion_write(struct memregion *memregion, ulong offset, void *src, ulong nbytes) { - return memregion_readwrite(TRUE, memregion, offset, src, nbytes); + return memregion_readwrite(1, memregion, offset, src, nbytes); } EXPORT_SYMBOL_GPL(visor_memregion_write); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/30] staging: unisys: changes needs_lock from bool to int
From: Erik Arfvidson This patch changes needs_lock from bool to int. As a result this changes variable needs_lock inside function visorchannel_create_guts. Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c index 3c13276..3ccd7f9 100644 --- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c +++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c @@ -33,7 +33,7 @@ struct visorchannel { struct channel_header chan_hdr; uuid_le guid; ulong size; - BOOL needs_lock;/* channel creator knows if more than one + int needs_lock; /* channel creator knows if more than one * thread will be inserting or removing */ spinlock_t insert_lock; /* protect head writes in chan_hdr */ spinlock_t remove_lock; /* protect tail writes in chan_hdr */ @@ -52,7 +52,7 @@ struct visorchannel { static struct visorchannel * visorchannel_create_guts(HOSTADDRESS physaddr, ulong channel_bytes, struct visorchannel *parent, ulong off, uuid_le guid, -BOOL needs_lock) +int needs_lock) { struct visorchannel *p = NULL; void *rc = NULL; @@ -118,7 +118,7 @@ struct visorchannel * visorchannel_create(HOSTADDRESS physaddr, ulong channel_bytes, uuid_le guid) { return visorchannel_create_guts(physaddr, channel_bytes, NULL, 0, guid, - FALSE); + 0); } EXPORT_SYMBOL_GPL(visorchannel_create); @@ -127,7 +127,7 @@ visorchannel_create_with_lock(HOSTADDRESS physaddr, ulong channel_bytes, uuid_le guid) { return visorchannel_create_guts(physaddr, channel_bytes, NULL, 0, guid, - TRUE); + 1); } EXPORT_SYMBOL_GPL(visorchannel_create_with_lock); @@ -137,7 +137,7 @@ visorchannel_create_overlapped(ulong channel_bytes, uuid_le guid) { return visorchannel_create_guts(0, channel_bytes, parent, off, guid, - FALSE); + 0); } EXPORT_SYMBOL_GPL(visorchannel_create_overlapped); @@ -147,7 +147,7 @@ visorchannel_create_overlapped_with_lock(ulong channel_bytes, uuid_le guid) { return visorchannel_create_guts(0, channel_bytes, parent, off, guid, - TRUE); + 1); } EXPORT_SYMBOL_GPL(visorchannel_create_overlapped_with_lock); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/30] staging: unisys: change charqueue.[ch] variables from bool to int
From: Erik Arfvidson This patch changes charqueue.[ch] functions and variables from bool to int including their return values. Signed-off-by: Erik Arfvidson Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorutil/charqueue.c | 4 ++-- drivers/staging/unisys/visorutil/charqueue.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorutil/charqueue.c b/drivers/staging/unisys/visorutil/charqueue.c index ac7acb7..0d1eb0d 100644 --- a/drivers/staging/unisys/visorutil/charqueue.c +++ b/drivers/staging/unisys/visorutil/charqueue.c @@ -66,9 +66,9 @@ void visor_charqueue_enqueue(struct charqueue *charqueue, unsigned char c) } EXPORT_SYMBOL_GPL(visor_charqueue_enqueue); -BOOL visor_charqueue_is_empty(struct charqueue *charqueue) +int visor_charqueue_is_empty(struct charqueue *charqueue) { - BOOL b; + int b; spin_lock(&charqueue->lock); b = IS_EMPTY(charqueue); diff --git a/drivers/staging/unisys/visorutil/charqueue.h b/drivers/staging/unisys/visorutil/charqueue.h index 56c1f79..358e8cb 100644 --- a/drivers/staging/unisys/visorutil/charqueue.h +++ b/drivers/staging/unisys/visorutil/charqueue.h @@ -31,7 +31,7 @@ void visor_charqueue_enqueue(struct charqueue *charqueue, unsigned char c); int charqueue_dequeue(struct charqueue *charqueue); int visor_charqueue_dequeue_n(struct charqueue *charqueue, unsigned char *buf, int n); -BOOL visor_charqueue_is_empty(struct charqueue *charqueue); +int visor_charqueue_is_empty(struct charqueue *charqueue); void visor_charqueue_destroy(struct charqueue *charqueue); #endif -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: lustre: lov: lov_dev: fix sparse warning of static declaration
This patch adds a static keyword to cl_lov_device_mutex_class variable to suppress the warning of static declaration Signed-off-by: Mohammad Jamal --- drivers/staging/lustre/lustre/lov/lov_dev.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lov/lov_dev.c b/drivers/staging/lustre/lustre/lov/lov_dev.c index 796a015..711b837 100644 --- a/drivers/staging/lustre/lustre/lov/lov_dev.c +++ b/drivers/staging/lustre/lustre/lov/lov_dev.c @@ -60,7 +60,7 @@ struct kmem_cache *lovsub_req_kmem; struct kmem_cache *lov_lock_link_kmem; /** Lock class of lov_device::ld_mutex. */ -struct lock_class_key cl_lov_device_mutex_class; +static struct lock_class_key cl_lov_device_mutex_class; struct lu_kmem_descr lov_caches[] = { { -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/6] staging: rtl8188eu: hal: removed code indent error
>> @@ -101,8 +101,7 @@ void rtl88eu_phy_rf6052_set_cck_txpower(struct adapter >> *adapt, u8 *powerlevel) >> ptr++; >> } >> } >> - rtl88eu_dm_txpower_track_adjust(&hal_data->odmpriv, 1, &direction, >> - &pwrtrac_value); >> + rtl88eu_dm_txpower_track_adjust(&hal_data->odmpriv, 1, &direction, >> &pwrtrac_value); > you are introducing one warning to fix one error. line over 80 character. Isn't that warning more of a guideline, rather than an actual warning? This seems more readable than: - rtl88eu_dm_txpower_track_adjust(&hal_data->odmpriv, 1, &direction, - &pwrtrac_value); + rtl88eu_dm_txpower_track_adjust(&hal_data->odmpriv, 1, + &direction, &pwrtrac_value); Bas ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/6] staging: rtl8188eu: hal: removed code indent error
On Tue, Feb 10, 2015 at 03:27:11PM +0100, Bas Peters wrote: > >> @@ -101,8 +101,7 @@ void rtl88eu_phy_rf6052_set_cck_txpower(struct adapter > >> *adapt, u8 *powerlevel) > >> ptr++; > >> } > >> } > >> - rtl88eu_dm_txpower_track_adjust(&hal_data->odmpriv, 1, &direction, > >> - &pwrtrac_value); > >> + rtl88eu_dm_txpower_track_adjust(&hal_data->odmpriv, 1, &direction, > >> &pwrtrac_value); > > you are introducing one warning to fix one error. line over 80 character. > > Isn't that warning more of a guideline, rather than an actual warning? > This seems more readable than: > > - rtl88eu_dm_txpower_track_adjust(&hal_data->odmpriv, 1, &direction, > - &pwrtrac_value); > + rtl88eu_dm_txpower_track_adjust(&hal_data->odmpriv, 1, > + > &direction, &pwrtrac_value); CodingStyle says "Statements longer than 80 columns will be broken into sensible chunks, unless exceeding 80 columns significantly increases readability and does not hide information" i agree that this is more readable but can it be called significant improvement ? but ofcourse final decision is on Greg. sudip > > Bas ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 1/1] staging: ozwpan: Remove allocation from delaration line
On Tue, 2015-02-10 at 13:13 +0300, Dan Carpenter wrote: > > diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c [] > > @@ -280,8 +280,9 @@ static void oz_free_urb_link(struct oz_urb_link *urbl) > > */ > > static struct oz_endpoint *oz_ep_alloc(int buffer_size, gfp_t mem_flags) > > { > > - struct oz_endpoint *ep = > > - kzalloc(sizeof(struct oz_endpoint)+buffer_size, mem_flags); > > + struct oz_endpoint *ep; > > + > > + ep = kzalloc(sizeof(struct oz_endpoint)+buffer_size, mem_flags); > > if (ep) { > > Also notice how in the original code, we had to mangle the code to make > it fit into 80 characters so the new code looks much better. or maybe ep = kzalloc(sizeof(*ep) + buffer_size, mem_flags); The current function also tests the return of ep slightly backwards. static struct oz_endpoint *oz_ep_alloc(int buffer_size, gfp_t mem_flags) { struct oz_endpoint *ep = kzalloc(sizeof(struct oz_endpoint)+buffer_size, mem_flags); if (ep) { INIT_LIST_HEAD(&ep->urb_list); INIT_LIST_HEAD(&ep->link); ep->credit = -1; if (buffer_size) { ep->buffer_size = buffer_size; ep->buffer = (u8 *)(ep+1); } } return ep; } Perhaps more typical would be: static struct oz_endpoint *oz_ep_alloc(int buffer_size, gfp_t mem_flags) { struct oz_endpoint *ep; ep = kzalloc(sizeof(*ep) + buffer_size, mem_flags); if (!ep) return NULL; INIT_LIST_HEAD(&ep->urb_list); INIT_LIST_HEAD(&ep->link); ep->credit = -1; if (buffer_size) { ep->buffer_size = buffer_size; ep->buffer = (u8 *)(ep + 1); } return ep; } Maybe buffer_size should be size_t too to avoid possible negative values. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/6] staging: rtl8188eu: hal: removed code indent error
On Tue, Feb 10, 2015 at 06:32:49PM +0530, Pushpendra Singh wrote: > Removed checkpatch.pl error > ERROR: code indent should use tabs where possible > > Signed-off-by: Pushpendra Singh > --- > drivers/staging/rtl8188eu/hal/rf.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8188eu/hal/rf.c > b/drivers/staging/rtl8188eu/hal/rf.c > index eea4c8a..88a026c 100644 > --- a/drivers/staging/rtl8188eu/hal/rf.c > +++ b/drivers/staging/rtl8188eu/hal/rf.c > @@ -101,8 +101,7 @@ void rtl88eu_phy_rf6052_set_cck_txpower(struct adapter > *adapt, u8 *powerlevel) > ptr++; > } > } > - rtl88eu_dm_txpower_track_adjust(&hal_data->odmpriv, 1, &direction, > - &pwrtrac_value); > + rtl88eu_dm_txpower_track_adjust(&hal_data->odmpriv, 1, &direction, > &pwrtrac_value); you are introducing one warning to fix one error. line over 80 character. sudip > > if (direction == 1) { > /* Increase TX power */ > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 1/1] staging: unisys: Remove allocation from declaration line
This patch removes allocation from declaration line because people are known to gloss over declarations. Signed-off-by: Quentin Lambert --- The second of version of this patch fix the checkpatch warning of line over 80 char by rewriting the size argument of kmalloc as suggested by Sudip. drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- drivers/staging/unisys/visorutil/charqueue.c| 3 ++- drivers/staging/unisys/visorutil/memregion_direct.c | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 82e259d..9251714 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1604,9 +1604,9 @@ parahotplug_next_expiration(void) static struct parahotplug_request * parahotplug_request_create(struct controlvm_message *msg) { - struct parahotplug_request *req = - kmalloc(sizeof(struct parahotplug_request), - GFP_KERNEL|__GFP_NORETRY); + struct parahotplug_request *req; + + req = kmalloc(sizeof(*req), GFP_KERNEL|__GFP_NORETRY); if (req == NULL) return NULL; diff --git a/drivers/staging/unisys/visorutil/charqueue.c b/drivers/staging/unisys/visorutil/charqueue.c index ac7acb7..e2ee5ee 100644 --- a/drivers/staging/unisys/visorutil/charqueue.c +++ b/drivers/staging/unisys/visorutil/charqueue.c @@ -36,8 +36,9 @@ struct charqueue { struct charqueue *visor_charqueue_create(ulong nslots) { int alloc_size = sizeof(struct charqueue) + nslots + 1; - struct charqueue *cq = kmalloc(alloc_size, GFP_KERNEL|__GFP_NORETRY); + struct charqueue *cq; + cq = kmalloc(alloc_size, GFP_KERNEL|__GFP_NORETRY); if (cq == NULL) { ERRDRV("visor_charqueue_create allocation failed (alloc_size=%d)", alloc_size); diff --git a/drivers/staging/unisys/visorutil/memregion_direct.c b/drivers/staging/unisys/visorutil/memregion_direct.c index 33522cc..f4ecac0 100644 --- a/drivers/staging/unisys/visorutil/memregion_direct.c +++ b/drivers/staging/unisys/visorutil/memregion_direct.c @@ -41,8 +41,9 @@ struct memregion * visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes) { struct memregion *rc = NULL; - struct memregion *memregion = kzalloc(sizeof(*memregion), - GFP_KERNEL | __GFP_NORETRY); + struct memregion *memregion; + + memregion = kzalloc(sizeof(*memregion), GFP_KERNEL | __GFP_NORETRY); if (memregion == NULL) { ERRDRV("visor_memregion_create allocation failed"); return NULL; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
doubt about sm7xxfb
Hi Greg, we have this sm7xxfb in drivers/staging now which is supporting SM710, SM712, SM721 and SM722. I am also working on another new hardware SM750, which will be ready for staging in next 1 -2 weeks. this SM750 is entirely different hardware and these two drivers will have nothing in common. So should i place it in sm7xxfb? or i keep it in a new folder drivers/staging/sm750fb? or maybe place them in separate folders sm712 and sm750 under drivers/staging/sm7xxfb? regards sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] staging: unisys: Remove allocation from declaration line
On Tue, Feb 10, 2015 at 02:02:14PM +0100, Quentin Lambert wrote: > This patch removes allocation from declaration line because > people are known to gloss over declarations. > > Signed-off-by: Quentin Lambert > --- > drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- > drivers/staging/unisys/visorutil/charqueue.c| 3 ++- > drivers/staging/unisys/visorutil/memregion_direct.c | 5 +++-- > 3 files changed, 8 insertions(+), 6 deletions(-) > > diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c > b/drivers/staging/unisys/visorchipset/visorchipset_main.c > index 82e259d..a6c6bb7 100644 > --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c > +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c > @@ -1604,9 +1604,9 @@ parahotplug_next_expiration(void) > static struct parahotplug_request * > parahotplug_request_create(struct controlvm_message *msg) > { > - struct parahotplug_request *req = > - kmalloc(sizeof(struct parahotplug_request), > - GFP_KERNEL|__GFP_NORETRY); > + struct parahotplug_request *req; > + > + req = kmalloc(sizeof(struct parahotplug_request), > GFP_KERNEL|__GFP_NORETRY); if you make it as: req = kmalloc(sizeof(*req), GFP_KERNEL|__GFP_NORETRY); then this will not give you checkpatch warning of line over 80 char. regards sudip > if (req == NULL) > return NULL; > return NULL; > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] staging: unisys: Remove allocation from declaration line
This patch removes allocation from declaration line because people are known to gloss over declarations. Signed-off-by: Quentin Lambert --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- drivers/staging/unisys/visorutil/charqueue.c| 3 ++- drivers/staging/unisys/visorutil/memregion_direct.c | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 82e259d..a6c6bb7 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1604,9 +1604,9 @@ parahotplug_next_expiration(void) static struct parahotplug_request * parahotplug_request_create(struct controlvm_message *msg) { - struct parahotplug_request *req = - kmalloc(sizeof(struct parahotplug_request), - GFP_KERNEL|__GFP_NORETRY); + struct parahotplug_request *req; + + req = kmalloc(sizeof(struct parahotplug_request), GFP_KERNEL|__GFP_NORETRY); if (req == NULL) return NULL; diff --git a/drivers/staging/unisys/visorutil/charqueue.c b/drivers/staging/unisys/visorutil/charqueue.c index ac7acb7..e2ee5ee 100644 --- a/drivers/staging/unisys/visorutil/charqueue.c +++ b/drivers/staging/unisys/visorutil/charqueue.c @@ -36,8 +36,9 @@ struct charqueue { struct charqueue *visor_charqueue_create(ulong nslots) { int alloc_size = sizeof(struct charqueue) + nslots + 1; - struct charqueue *cq = kmalloc(alloc_size, GFP_KERNEL|__GFP_NORETRY); + struct charqueue *cq; + cq = kmalloc(alloc_size, GFP_KERNEL|__GFP_NORETRY); if (cq == NULL) { ERRDRV("visor_charqueue_create allocation failed (alloc_size=%d)", alloc_size); diff --git a/drivers/staging/unisys/visorutil/memregion_direct.c b/drivers/staging/unisys/visorutil/memregion_direct.c index 33522cc..f4ecac0 100644 --- a/drivers/staging/unisys/visorutil/memregion_direct.c +++ b/drivers/staging/unisys/visorutil/memregion_direct.c @@ -41,8 +41,9 @@ struct memregion * visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes) { struct memregion *rc = NULL; - struct memregion *memregion = kzalloc(sizeof(*memregion), - GFP_KERNEL | __GFP_NORETRY); + struct memregion *memregion; + + memregion = kzalloc(sizeof(*memregion), GFP_KERNEL | __GFP_NORETRY); if (memregion == NULL) { ERRDRV("visor_memregion_create allocation failed"); return NULL; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/6] staging: rtl8188eu: hal: removed unnecessary parentheses
Removed checkpatch.pl below warning WARNING: Unnecessary parentheses - maybe == should be = ? Signed-off-by: Pushpendra Singh --- drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 7714f5f..274f4ac 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -1218,7 +1218,7 @@ static void hw_var_set_opmode(struct adapter *Adapter, u8 variable, u8 *val) StopTxBeacon(Adapter); usb_write8(Adapter, REG_BCN_CTRL, 0x19);/* disable atim wnd */ - } else if ((mode == _HW_STATE_ADHOC_)) { + } else if (mode == _HW_STATE_ADHOC_) { ResumeTxBeacon(Adapter); usb_write8(Adapter, REG_BCN_CTRL, 0x1a); } else if (mode == _HW_STATE_AP_) { -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/6] staging: rt8188eu: hal: removed space before ','
Removed checkpatch.pl error ERROR: space prohibited before that ',' (ctx:WxW) Signed-off-by: Pushpendra Singh --- drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c | 4 ++-- drivers/staging/rtl8188eu/hal/odm.c | 8 drivers/staging/rtl8188eu/hal/pwrseqcmd.c| 2 +- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c| 6 +++--- drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c b/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c index 3c651d5..b5e5c93 100644 --- a/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c +++ b/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c @@ -87,7 +87,7 @@ static u8 DROPING_NECESSARY[RATESIZE] = { static u8 PendingForRateUpFail[5] = {2, 10, 24, 40, 60}; static u16 DynamicTxRPTTiming[6] = { - 0x186a, 0x30d4, 0x493e, 0x61a8, 0x7a12 , 0x927c}; /* 200ms-1200ms */ + 0x186a, 0x30d4, 0x493e, 0x61a8, 0x7a12, 0x927c}; /* 200ms-1200ms */ /* End Rate adaptive parameters */ @@ -714,7 +714,7 @@ void ODM_RA_TxRPT2Handle_8188E(struct odm_dm_struct *dm_odm, u8 *TxRPT_Buf, u16 pRAInfo->RTY[0], pRAInfo->RTY[1], pRAInfo->RTY[2], pRAInfo->RTY[3], pRAInfo->RTY[4], pRAInfo->DROP, -macid_entry0 , macid_entry1)); +macid_entry0, macid_entry1)); if (pRAInfo->PTActive) { if (pRAInfo->RAstage < 5) odm_RateDecision_8188E(dm_odm, pRAInfo); diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c index 06477e8..d12eac4 100644 --- a/drivers/staging/rtl8188eu/hal/odm.c +++ b/drivers/staging/rtl8188eu/hal/odm.c @@ -881,7 +881,7 @@ void ODM_RF_Saving(struct odm_dm_struct *pDM_Odm, u8 bForceInNormal) if (pDM_PSTable->PreRFState != pDM_PSTable->CurRFState) { if (pDM_PSTable->CurRFState == RF_Save) { - phy_set_bb_reg(adapter, 0x874 , 0x1C, 0x2); /* Reg874[20:18]=3'b010 */ + phy_set_bb_reg(adapter, 0x874, 0x1C, 0x2); /* Reg874[20:18]=3'b010 */ phy_set_bb_reg(adapter, 0xc70, BIT3, 0); /* RegC70[3]=1'b0 */ phy_set_bb_reg(adapter, 0x85c, 0xFF00, 0x63); /* Reg85C[31:24]=0x63 */ phy_set_bb_reg(adapter, 0x874, 0xC000, 0x2); /* Reg874[15:14]=2'b10 */ @@ -889,7 +889,7 @@ void ODM_RF_Saving(struct odm_dm_struct *pDM_Odm, u8 bForceInNormal) phy_set_bb_reg(adapter, 0x818, BIT28, 0x0); /* Reg818[28]=1'b0 */ phy_set_bb_reg(adapter, 0x818, BIT28, 0x1); /* Reg818[28]=1'b1 */ } else { - phy_set_bb_reg(adapter, 0x874 , 0x1CC000, pDM_PSTable->Reg874); + phy_set_bb_reg(adapter, 0x874, 0x1CC000, pDM_PSTable->Reg874); phy_set_bb_reg(adapter, 0xc70, BIT3, pDM_PSTable->RegC70); phy_set_bb_reg(adapter, 0x85c, 0xFF00, pDM_PSTable->Reg85C); phy_set_bb_reg(adapter, 0xa74, 0xF000, pDM_PSTable->RegA74); @@ -1043,7 +1043,7 @@ void odm_RefreshRateAdaptiveMaskCE(struct odm_dm_struct *pDM_Odm) for (i = 0; i < ODM_ASSOCIATE_ENTRY_NUM; i++) { struct sta_info *pstat = pDM_Odm->pODM_StaInfo[i]; if (IS_STA_VALID(pstat)) { - if (ODM_RAStateCheck(pDM_Odm, pstat->rssi_stat.UndecoratedSmoothedPWDB, false , &pstat->rssi_level)) { + if (ODM_RAStateCheck(pDM_Odm, pstat->rssi_stat.UndecoratedSmoothedPWDB, false, &pstat->rssi_level)) { ODM_RT_TRACE(pDM_Odm, ODM_COMP_RA_MASK, ODM_DBG_LOUD, ("RSSI:%d, RSSI_LEVEL:%d\n", pstat->rssi_stat.UndecoratedSmoothedPWDB, pstat->rssi_level)); @@ -1191,7 +1191,7 @@ void odm_RSSIMonitorCheckCE(struct odm_dm_struct *pDM_Odm) pdmpriv->EntryMinUndecoratedSmoothedPWDB = 0; FindMinimumRSSI(Adapter); - ODM_CmnInfoUpdate(&pHalData->odmpriv , ODM_CMNINFO_RSSI_MIN, pdmpriv->MinUndecoratedPWDBForDM); + ODM_CmnInfoUpdate(&pHalData->odmpriv, ODM_CMNINFO_RSSI_MIN, pdmpriv->MinUndecoratedPWDBForDM); } /* 3 */ diff --git a/drivers/staging/rtl8188eu/hal/pwrseqcmd.c b/drivers/staging/rtl8188eu/hal/pwrseqcmd.c index be0663e..768bf57 100644 --- a/drivers/staging/rtl8188eu/hal/pwrseqcmd.c +++ b/drivers/staging/rtl8188eu/hal/pwrseqcmd.c @@ -37,7 +37,7 @@ u8 rtl88eu_pwrseqcmdparsing(struct adapter *padapter, u8 cut_vers,
[PATCH 2/6] staging: rtl8188eu: hal: removed code indent error
Removed checkpatch.pl error ERROR: code indent should use tabs where possible Signed-off-by: Pushpendra Singh --- drivers/staging/rtl8188eu/hal/rf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rf.c b/drivers/staging/rtl8188eu/hal/rf.c index eea4c8a..88a026c 100644 --- a/drivers/staging/rtl8188eu/hal/rf.c +++ b/drivers/staging/rtl8188eu/hal/rf.c @@ -101,8 +101,7 @@ void rtl88eu_phy_rf6052_set_cck_txpower(struct adapter *adapt, u8 *powerlevel) ptr++; } } - rtl88eu_dm_txpower_track_adjust(&hal_data->odmpriv, 1, &direction, - &pwrtrac_value); + rtl88eu_dm_txpower_track_adjust(&hal_data->odmpriv, 1, &direction, &pwrtrac_value); if (direction == 1) { /* Increase TX power */ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/6] staging: rtl8188eu: hal: added blank line after declarations
Removed checkpatch.pl below warning WARNING: Missing a blank line after declarations Signed-off-by: Pushpendra Singh --- .../staging/rtl8188eu/hal/Hal8188ERateAdaptive.c | 1 + drivers/staging/rtl8188eu/hal/hal_intf.c | 2 ++ drivers/staging/rtl8188eu/hal/odm.c| 3 +++ drivers/staging/rtl8188eu/hal/odm_RTL8188E.c | 1 + drivers/staging/rtl8188eu/hal/phy.c| 1 + drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 1 + drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 2 ++ drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 3 ++- drivers/staging/rtl8188eu/hal/usb_halinit.c| 22 +++--- 9 files changed, 32 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c b/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c index b5e5c93..4a0504d 100644 --- a/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c +++ b/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c @@ -538,6 +538,7 @@ int ODM_RAInfo_Init(struct odm_dm_struct *dm_odm, u8 macid) struct odm_ra_info *pRaInfo = &dm_odm->RAInfo[macid]; u8 WirelessMode = 0xFF; /* invalid value */ u8 max_rate_idx = 0x13; /* MCS7 */ + if (dm_odm->pWirelessMode != NULL) WirelessMode = *(dm_odm->pWirelessMode); diff --git a/drivers/staging/rtl8188eu/hal/hal_intf.c b/drivers/staging/rtl8188eu/hal/hal_intf.c index 4bdbed2..5edb5c4 100644 --- a/drivers/staging/rtl8188eu/hal/hal_intf.c +++ b/drivers/staging/rtl8188eu/hal/hal_intf.c @@ -202,6 +202,7 @@ s32 rtw_hal_xmit(struct adapter *adapt, struct xmit_frame *pxmitframe) s32 rtw_hal_mgnt_xmit(struct adapter *adapt, struct xmit_frame *pmgntframe) { s32 ret = _FAIL; + if (adapt->HalFunc.mgnt_xmit) ret = adapt->HalFunc.mgnt_xmit(adapt, pmgntframe); return ret; @@ -236,6 +237,7 @@ void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level) #ifdef CONFIG_88EU_AP_MODE struct sta_info *psta = NULL; struct sta_priv *pstapriv = &adapt->stapriv; + if ((mac_id-1) > 0) psta = pstapriv->sta_aid[(mac_id-1) - 1]; if (psta) diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c index d12eac4..25a4043 100644 --- a/drivers/staging/rtl8188eu/hal/odm.c +++ b/drivers/staging/rtl8188eu/hal/odm.c @@ -1042,6 +1042,7 @@ void odm_RefreshRateAdaptiveMaskCE(struct odm_dm_struct *pDM_Odm) for (i = 0; i < ODM_ASSOCIATE_ENTRY_NUM; i++) { struct sta_info *pstat = pDM_Odm->pODM_StaInfo[i]; + if (IS_STA_VALID(pstat)) { if (ODM_RAStateCheck(pDM_Odm, pstat->rssi_stat.UndecoratedSmoothedPWDB, false, &pstat->rssi_level)) { ODM_RT_TRACE(pDM_Odm, ODM_COMP_RA_MASK, ODM_DBG_LOUD, @@ -1107,6 +1108,7 @@ void odm_DynamicTxPowerInit(struct odm_dm_struct *pDM_Odm) struct adapter *Adapter = pDM_Odm->Adapter; struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter); struct dm_priv *pdmpriv = &pHalData->dmpriv; + pdmpriv->bDynamicTxPowerEnable = false; pdmpriv->LastDTPLvl = TxHighPwrLevel_Normal; pdmpriv->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal; @@ -1269,6 +1271,7 @@ void odm_HwAntDiv(struct odm_dm_struct *pDM_Odm) void ODM_EdcaTurboInit(struct odm_dm_struct *pDM_Odm) { struct adapter *Adapter = pDM_Odm->Adapter; + pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA = false; pDM_Odm->DM_EDCA_Table.bIsCurRDLState = false; Adapter->recvpriv.bIsAnyNonBEPkts = false; diff --git a/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c b/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c index fd7930f..57657aa 100644 --- a/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c +++ b/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c @@ -252,6 +252,7 @@ void rtl88eu_dm_ant_sel_statistics(struct odm_dm_struct *dm_odm, u8 antsel_tr_mux, u32 mac_id, u8 rx_pwdb_all) { struct fast_ant_train *dm_fat_tbl = &dm_odm->DM_FatTable; + if (dm_odm->AntDivType == CG_TRX_HW_ANTDIV) { if (antsel_tr_mux == MAIN_ANT_CG_TRX) { dm_fat_tbl->MainAnt_Sum[mac_id] += rx_pwdb_all; diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c index 0a1a7d6..40aa0ab 100644 --- a/drivers/staging/rtl8188eu/hal/phy.c +++ b/drivers/staging/rtl8188eu/hal/phy.c @@ -1187,6 +1187,7 @@ static void phy_iq_calibrate(struct adapter *adapt, s32 result[][8], rFPGA0_XB_RFInterfaceOE, rFPGA0_RFMOD}; u32 retry_count = 9; + if (*(dm_odm->mp_mode) == 1) retry_count = 9; else diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c index cf2609f..e8015ae 100644 --- a/drive
[PATCH 3/6] staging: rtl8188eu: hal: removed unnecessary braces
Removed checkpatch.pl below warning WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Pushpendra Singh --- drivers/staging/rtl8188eu/hal/bb_cfg.c| 15 +++ drivers/staging/rtl8188eu/hal/fw.c| 3 +-- drivers/staging/rtl8188eu/hal/odm_HWConfig.c | 5 ++--- drivers/staging/rtl8188eu/hal/odm_RTL8188E.c | 3 +-- drivers/staging/rtl8188eu/hal/phy.c | 12 drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 6 ++ drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 3 +-- drivers/staging/rtl8188eu/hal/usb_halinit.c | 3 +-- 8 files changed, 19 insertions(+), 31 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/bb_cfg.c b/drivers/staging/rtl8188eu/hal/bb_cfg.c index 1e963bf..76d3db1 100644 --- a/drivers/staging/rtl8188eu/hal/bb_cfg.c +++ b/drivers/staging/rtl8188eu/hal/bb_cfg.c @@ -554,21 +554,20 @@ static void store_pwrindex_offset(struct adapter *Adapter, u32 regaddr, u32 bitm static void rtl_addr_delay(struct adapter *adapt, u32 addr, u32 bit_mask, u32 data) { - if (addr == 0xfe) { + if (addr == 0xfe) msleep(50); - } else if (addr == 0xfd) { + else if (addr == 0xfd) mdelay(5); - } else if (addr == 0xfc) { + else if (addr == 0xfc) mdelay(1); - } else if (addr == 0xfb) { + else if (addr == 0xfb) udelay(50); - } else if (addr == 0xfa) { + else if (addr == 0xfa) udelay(5); - } else if (addr == 0xf9) { + else if (addr == 0xf9) udelay(1); - } else{ + else store_pwrindex_offset(adapt, addr, bit_mask, data); - } } static bool config_bb_with_pgheader(struct adapter *adapt) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 3b28754..a71c542 100644 --- a/drivers/staging/rtl8188eu/hal/fw.c +++ b/drivers/staging/rtl8188eu/hal/fw.c @@ -154,9 +154,8 @@ static int _rtl88e_fw_free_to_go(struct adapter *adapt) break; } while (counter++ < POLLING_READY_TIMEOUT_COUNT); - if (counter >= POLLING_READY_TIMEOUT_COUNT) { + if (counter >= POLLING_READY_TIMEOUT_COUNT) goto exit; - } value32 = usb_read32(adapt, REG_MCUFWDL); value32 |= MCUFWDL_RDY; diff --git a/drivers/staging/rtl8188eu/hal/odm_HWConfig.c b/drivers/staging/rtl8188eu/hal/odm_HWConfig.c index 29f87df..7213187 100644 --- a/drivers/staging/rtl8188eu/hal/odm_HWConfig.c +++ b/drivers/staging/rtl8188eu/hal/odm_HWConfig.c @@ -418,11 +418,10 @@ static void ODM_PhyStatusQuery_92CSeries(struct odm_dm_struct *dm_odm, { odm_RxPhyStatus92CSeries_Parsing(dm_odm, pPhyInfo, pPhyStatus, pPktinfo); - if (dm_odm->RSSI_test) { + if (dm_odm->RSSI_test) ;/* Select the packets to do RSSI checking for antenna switching. */ - } else { + else odm_Process_RSSIForDM(dm_odm, pPhyInfo, pPktinfo); - } } void ODM_PhyStatusQuery(struct odm_dm_struct *dm_odm, diff --git a/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c b/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c index d3c6873..fd7930f 100644 --- a/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c +++ b/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c @@ -103,9 +103,8 @@ static void dm_fast_training_init(struct odm_dm_struct *dm_odm) struct fast_ant_train *dm_fat_tbl = &dm_odm->DM_FatTable; u32 AntCombination = 2; - if (*(dm_odm->mp_mode) == 1) { + if (*(dm_odm->mp_mode) == 1) return; - } for (i = 0; i < 6; i++) { dm_fat_tbl->Bssid[i] = 0; diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c index 3f663fe..0a1a7d6 100644 --- a/drivers/staging/rtl8188eu/hal/phy.c +++ b/drivers/staging/rtl8188eu/hal/phy.c @@ -991,9 +991,8 @@ static void save_adda_registers(struct adapter *adapt, u32 *addareg, { u32 i; - for (i = 0; i < register_num; i++) { + for (i = 0; i < register_num; i++) backup[i] = phy_query_bb_reg(adapt, addareg[i], bMaskDWord); - } } static void save_mac_registers(struct adapter *adapt, u32 *mac_reg, @@ -1001,9 +1000,8 @@ static void save_mac_registers(struct adapter *adapt, u32 *mac_reg, { u32 i; - for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++) { + for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++) backup[i] = usb_read8(adapt, mac_reg[i]); - } backup[i] = usb_read32(adapt, mac_reg[i]); } @@ -1021,9 +1019,8 @@ static void reload_mac_registers(struct adapter *adapt, { u32 i; - for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++) { + for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++) usb_write8(adapt, mac_reg[i], (u8)backup[i]); - } usb_wr
[PATCH 5/6] staging: rtl8188eu: hal: removed spaces at start of line
Removed checkpatch.pl below warning WARNING: please, no spaces at the start of a line Signed-off-by: Pushpendra Singh --- drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 78ebc77..7714f5f 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -1004,7 +1004,7 @@ static u32 rtl8188eu_hal_deinit(struct adapter *Adapter) } } return _SUCCESS; - } +} static unsigned int rtl8188eu_inirp_init(struct adapter *Adapter) { -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: sm7xxfb: make vgamode static
the variable vgamode is used only in this file and hence can be safely made as static. Signed-off-by: Sudip Mukherjee --- drivers/staging/sm7xxfb/sm7xx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/sm7xxfb/sm7xx.h b/drivers/staging/sm7xxfb/sm7xx.h index 7cc1896..c5d6253 100644 --- a/drivers/staging/sm7xxfb/sm7xx.h +++ b/drivers/staging/sm7xxfb/sm7xx.h @@ -119,7 +119,7 @@ struct ModeInit { /** SM712 Mode table. **/ -struct ModeInit vgamode[] = { +static struct ModeInit vgamode[] = { { /* mode#0: 640 x 480 16Bpp 60Hz */ 640, 480, 16, 60, -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: panel: register driver after checking device
register the driver only if lcd or keypad has been enabled and if both are disabled then just exit. Signed-off-by: Sudip Mukherjee --- drivers/staging/panel/panel.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index 6ed35b6..df044b2 100644 --- a/drivers/staging/panel/panel.c +++ b/drivers/staging/panel/panel.c @@ -2379,23 +2379,17 @@ static int __init panel_init_module(void) /* tells various subsystems about the fact that we are initializing */ init_in_progress = 1; - if (parport_register_driver(&panel_driver)) { - pr_err("could not register with parport. Aborting.\n"); - return -EIO; - } - if (!lcd.enabled && !keypad.enabled) { - /* no device enabled, let's release the parport */ - if (pprt) { - parport_release(pprt); - parport_unregister_device(pprt); - pprt = NULL; - } - parport_unregister_driver(&panel_driver); + /* no device enabled, let's exit */ pr_err("driver version " PANEL_VERSION " disabled.\n"); return -ENODEV; } + if (parport_register_driver(&panel_driver)) { + pr_err("could not register with parport. Aborting.\n"); + return -EIO; + } + register_reboot_notifier(&panel_notifier); if (pprt) -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: panel: initialize lcd if lcd enabled
initialiaze lcd parameters only if lcd is enabled. Signed-off-by: Sudip Mukherjee --- drivers/staging/panel/panel.c | 41 ++--- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index df044b2..05657f2 100644 --- a/drivers/staging/panel/panel.c +++ b/drivers/staging/panel/panel.c @@ -2323,25 +2323,6 @@ static int __init panel_init_module(void) break; } - /* -* Init lcd struct with load-time values to preserve exact current -* functionality (at least for now). -*/ - lcd.height = lcd_height; - lcd.width = lcd_width; - lcd.bwidth = lcd_bwidth; - lcd.hwidth = lcd_hwidth; - lcd.charset = lcd_charset; - lcd.proto = lcd_proto; - lcd.pins.e = lcd_e_pin; - lcd.pins.rs = lcd_rs_pin; - lcd.pins.rw = lcd_rw_pin; - lcd.pins.cl = lcd_cl_pin; - lcd.pins.da = lcd_da_pin; - lcd.pins.bl = lcd_bl_pin; - - /* Leave it for now, just in case */ - lcd.esc_seq.len = -1; /* * Overwrite selection with module param values (both keypad and lcd), @@ -2361,6 +2342,28 @@ static int __init panel_init_module(void) lcd.enabled = (selected_lcd_type > 0); + if (lcd.enabled) { + /* +* Init lcd struct with load-time values to preserve exact +* current functionality (at least for now). +*/ + lcd.height = lcd_height; + lcd.width = lcd_width; + lcd.bwidth = lcd_bwidth; + lcd.hwidth = lcd_hwidth; + lcd.charset = lcd_charset; + lcd.proto = lcd_proto; + lcd.pins.e = lcd_e_pin; + lcd.pins.rs = lcd_rs_pin; + lcd.pins.rw = lcd_rw_pin; + lcd.pins.cl = lcd_cl_pin; + lcd.pins.da = lcd_da_pin; + lcd.pins.bl = lcd_bl_pin; + + /* Leave it for now, just in case */ + lcd.esc_seq.len = -1; + } + switch (selected_keypad_type) { case KEYPAD_TYPE_OLD: keypad_profile = old_keypad_profile; -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 2/2] staging: unisys: fix directory warning
we were getting three warnings about timskmod and sparstopdriver and channels. These warnings were about no such file or directory. These directory names were included in the Makefile, but the directories were not existing. Signed-off-by: Sudip Mukherjee --- make W=1 is showing these warnings drivers/staging/unisys/uislib/Makefile | 2 -- drivers/staging/unisys/virthba/Makefile | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/staging/unisys/uislib/Makefile b/drivers/staging/unisys/uislib/Makefile index 08e620d..860f494 100644 --- a/drivers/staging/unisys/uislib/Makefile +++ b/drivers/staging/unisys/uislib/Makefile @@ -7,8 +7,6 @@ obj-$(CONFIG_UNISYS_UISLIB) += visoruislib.o visoruislib-y := uislib.o uisqueue.o uisthread.o uisutils.o ccflags-y += -Idrivers/staging/unisys/include -ccflags-y += -Idrivers/staging/unisys/channels ccflags-y += -Idrivers/staging/unisys/visorchipset -ccflags-y += -Idrivers/staging/unisys/sparstopdriver ccflags-y += -Idrivers/staging/unisys/common-spar/include ccflags-y += -Idrivers/staging/unisys/common-spar/include/channels diff --git a/drivers/staging/unisys/virthba/Makefile b/drivers/staging/unisys/virthba/Makefile index ba55ae1..a4e4037 100644 --- a/drivers/staging/unisys/virthba/Makefile +++ b/drivers/staging/unisys/virthba/Makefile @@ -6,7 +6,6 @@ obj-$(CONFIG_UNISYS_VIRTHBA)+= virthba.o ccflags-y += -Idrivers/staging/unisys/include ccflags-y += -Idrivers/staging/unisys/uislib -ccflags-y += -Idrivers/staging/unisys/timskmod ccflags-y += -Idrivers/staging/unisys/visorchipset ccflags-y += -Idrivers/staging/unisys/virtpci ccflags-y += -Idrivers/staging/unisys/common-spar/include -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 1/2] staging: unisys: remove unused variable
we were getting lots of warnings about _tempresult set but not used. _tempresult was used in the macro ISSUE_IO_VMCALL_POSTCODE_SEVERITY which was again using another macro ISSUE_IO_EXTENDED_VMCALL. but the value assigned to it was never used. Signed-off-by: Sudip Mukherjee --- make W=1 is showing these warnings drivers/staging/unisys/common-spar/include/vmcallinterface.h | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/vmcallinterface.h b/drivers/staging/unisys/common-spar/include/vmcallinterface.h index 7833371..59a7459 100644 --- a/drivers/staging/unisys/common-spar/include/vmcallinterface.h +++ b/drivers/staging/unisys/common-spar/include/vmcallinterface.h @@ -79,18 +79,15 @@ enum vmcall_monitor_interface_method_tuple { /* VMCALL identification tuples */ #define ISSUE_IO_VMCALL(method, param, result) \ (result = unisys_vmcall(method, (param) & 0x, \ (param) >> 32)) -#define ISSUE_IO_EXTENDED_VMCALL(method, param1, param2, \ -param3, result)\ - (result = unisys_extended_vmcall(method, param1,\ -param2, param3)) +#define ISSUE_IO_EXTENDED_VMCALL(method, param1, param2, param3) \ + unisys_extended_vmcall(method, param1, param2, param3) /* The following uses VMCALL_POST_CODE_LOGEVENT interface but is currently * not used much */ #define ISSUE_IO_VMCALL_POSTCODE_SEVERITY(postcode, severity) \ do { \ - u32 _tempresult = VMCALL_SUCCESS; \ ISSUE_IO_EXTENDED_VMCALL(VMCALL_POST_CODE_LOGEVENT, severity, \ -MDS_APPOS, postcode, _tempresult); \ +MDS_APPOS, postcode); \ } while (0) #endif -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging:lustre:libcfs: Merge linux-proc.c into module.c
module.c was previously the sole exporter of symbols from module.c This patch removes the global symbols by merging the two files. Signed-off-by: Matthew Tyler --- drivers/staging/lustre/lustre/libcfs/Makefile | 2 +- .../lustre/lustre/libcfs/linux/linux-proc.c| 577 - drivers/staging/lustre/lustre/libcfs/module.c | 546 ++- 3 files changed, 540 insertions(+), 585 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c diff --git a/drivers/staging/lustre/lustre/libcfs/Makefile b/drivers/staging/lustre/lustre/libcfs/Makefile index fcecbd2..2996a48 100644 --- a/drivers/staging/lustre/lustre/libcfs/Makefile +++ b/drivers/staging/lustre/lustre/libcfs/Makefile @@ -3,7 +3,7 @@ obj-$(CONFIG_LUSTRE_FS) += libcfs.o libcfs-linux-objs := linux-tracefile.o linux-debug.o libcfs-linux-objs += linux-prim.o linux-cpu.o libcfs-linux-objs += linux-tcpip.o -libcfs-linux-objs += linux-proc.o linux-curproc.o +libcfs-linux-objs += linux-curproc.o libcfs-linux-objs += linux-module.o libcfs-linux-objs += linux-crypto.o libcfs-linux-objs += linux-crypto-adler.o diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c deleted file mode 100644 index c539e37..000 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c +++ /dev/null @@ -1,577 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 2011, 2012, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * libcfs/libcfs/linux/linux-proc.c - * - * Author: Zach Brown - * Author: Peter J. Braam - * Author: Phil Schwan - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include - -# define DEBUG_SUBSYSTEM S_LNET - -#include "../../../include/linux/libcfs/libcfs.h" -#include -#include "../tracefile.h" - -static struct ctl_table_header *lnet_table_header = NULL; -extern char lnet_upcall[1024]; -/** - * The path of debug log dump upcall script. - */ -extern char lnet_debug_log_upcall[1024]; - -#define CTL_LNET (0x100) -enum { - PSDEV_DEBUG = 1, /* control debugging */ - PSDEV_SUBSYSTEM_DEBUG,/* control debugging */ - PSDEV_PRINTK,/* force all messages to console */ - PSDEV_CONSOLE_RATELIMIT, /* ratelimit console messages */ - PSDEV_CONSOLE_MAX_DELAY_CS, /* maximum delay over which we skip messages */ - PSDEV_CONSOLE_MIN_DELAY_CS, /* initial delay over which we skip messages */ - PSDEV_CONSOLE_BACKOFF,/* delay increase factor */ - PSDEV_DEBUG_PATH,/* crashdump log location */ - PSDEV_DEBUG_DUMP_PATH,/* crashdump tracelog location */ - PSDEV_CPT_TABLE, /* information about cpu partitions */ - PSDEV_LNET_UPCALL, /* User mode upcall script */ - PSDEV_LNET_MEMUSED, /* bytes currently PORTAL_ALLOCated */ - PSDEV_LNET_CATASTROPHE, /* if we have LBUGged or panic'd */ - PSDEV_LNET_PANIC_ON_LBUG, /* flag to panic on LBUG */ - PSDEV_LNET_DUMP_KERNEL, /* snapshot kernel debug buffer to file */ - PSDEV_LNET_DAEMON_FILE, /* spool kernel debug buffer to file */ - PSDEV_LNET_DEBUG_MB, /* size of debug buffer */ - PSDEV_LNET_DEBUG_LOG_UPCALL, /* debug log upcall script */ - PSDEV_LNET_WATCHDOG_RATELIMIT, /* ratelimit watchdog messages */ - PSDEV_LNET_FORCE_LBUG,/* hook to force an LBUG */ - PSDEV_LNET_FAIL_LOC, /* control test failures instrumentation */ - PSDEV_LNET_FAIL_VAL, /* userdata for fail loc */ -}; - -static int proc_call_handler(void *data, int write, loff_t *ppos, - v
Re: [PATCH 1/7] staging: rtl8188eu: core: added blank line after declarations
On Tue, Feb 10, 2015 at 03:34:09PM +0530, Pushpendra Singh wrote: > Removed following checkpatch.pl warning from mutiple files > WARNING: Missing a blank line after declarations you have not checked this patch with checkpatch. ERROR: trailing whitespace #502: FILE: drivers/staging/rtl8188eu/core/rtw_security.c:69: +^I$ > > Signed-off-by: Pushpendra Singh > mac_id = 0; > + nr_subframes = 0; > pattrib = &prframe->attrib; > > recvframe_pull(prframe, prframe->attrib.hdrlen); > diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c > b/drivers/staging/rtl8188eu/core/rtw_security.c > index bd8d60a..790fa91 100644 > --- a/drivers/staging/rtl8188eu/core/rtw_security.c > +++ b/drivers/staging/rtl8188eu/core/rtw_security.c > @@ -41,6 +41,7 @@ static void arcfour_init(struct arc4context *parc4ctx, u8 > *key, u32 key_len) > u32 stateindex; > u8 *state; > u32 counter; > + > state = parc4ctx->state; > parc4ctx->x = 0; > parc4ctx->y = 0; > @@ -65,6 +66,7 @@ static u32 arcfour_byte(struct arc4context *parc4ctx) > u32 y; > u32 sx, sy; > u8 *state; > + ^^ trailing whitespace regards sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] staging: ozwpan: Move code from success handling to error handling
On Tue, Feb 10, 2015 at 12:08:14PM +0100, Quentin Lambert wrote: > > On 10/02/2015 12:04, Dan Carpenter wrote: > >On Tue, Feb 10, 2015 at 11:42:08AM +0100, Quentin Lambert wrote: > >>The original version was success handling rather than error handling, > >>therefore this patch reduces nesting. > >> > >>Signed-off-by: Quentin Lambert > >Fantastic. :) Thanks! > > > >regards, > >dan carpenter > > > I am working on a second version to highlight the dependency with > the previous patch. Please don't resend. > > I don't know where the best place to signal it is though. > Should I specify it in the comment section linking the patch > via lkml mailing list? > Greg applies patches in the order they arrive so it should work automatically. Next time maybe add a comment under the --- cut off. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] staging: android: Remove allocation from declaration line
This patch removes allocation from declaration line because people are known to gloss over declarations. Signed-off-by: Quentin Lambert --- drivers/staging/android/ion/ion_page_pool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c index 4b88f11..7643d83 100644 --- a/drivers/staging/android/ion/ion_page_pool.c +++ b/drivers/staging/android/ion/ion_page_pool.c @@ -148,8 +148,9 @@ int ion_page_pool_shrink(struct ion_page_pool *pool, gfp_t gfp_mask, struct ion_page_pool *ion_page_pool_create(gfp_t gfp_mask, unsigned int order) { - struct ion_page_pool *pool = kmalloc(sizeof(struct ion_page_pool), -GFP_KERNEL); + struct ion_page_pool *pool; + + pool = kmalloc(sizeof(struct ion_page_pool), GFP_KERNEL); if (!pool) return NULL; pool->high_count = 0; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] staging: ozwpan: Move code from success handling to error handling
On 10/02/2015 12:04, Dan Carpenter wrote: On Tue, Feb 10, 2015 at 11:42:08AM +0100, Quentin Lambert wrote: The original version was success handling rather than error handling, therefore this patch reduces nesting. Signed-off-by: Quentin Lambert Fantastic. :) Thanks! regards, dan carpenter I am working on a second version to highlight the dependency with the previous patch. I don't know where the best place to signal it is though. Should I specify it in the comment section linking the patch via lkml mailing list? ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] staging: ozwpan: Move code from success handling to error handling
On Tue, Feb 10, 2015 at 11:42:08AM +0100, Quentin Lambert wrote: > The original version was success handling rather than error handling, > therefore this patch reduces nesting. > > Signed-off-by: Quentin Lambert Fantastic. :) Thanks! regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] staging: ozwpan: Move code from success handling to error handling
The original version was success handling rather than error handling, therefore this patch reduces nesting. Signed-off-by: Quentin Lambert --- drivers/staging/ozwpan/ozhcd.c | 18 +++--- drivers/staging/ozwpan/ozpd.c | 53 +- 2 files changed, 37 insertions(+), 34 deletions(-) diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c index 96e95bf..5ff4716 100644 --- a/drivers/staging/ozwpan/ozhcd.c +++ b/drivers/staging/ozwpan/ozhcd.c @@ -283,15 +283,17 @@ static struct oz_endpoint *oz_ep_alloc(int buffer_size, gfp_t mem_flags) struct oz_endpoint *ep; ep = kzalloc(sizeof(struct oz_endpoint)+buffer_size, mem_flags); - if (ep) { - INIT_LIST_HEAD(&ep->urb_list); - INIT_LIST_HEAD(&ep->link); - ep->credit = -1; - if (buffer_size) { - ep->buffer_size = buffer_size; - ep->buffer = (u8 *)(ep+1); - } + if (!ep) + return NULL; + + INIT_LIST_HEAD(&ep->urb_list); + INIT_LIST_HEAD(&ep->link); + ep->credit = -1; + if (buffer_size) { + ep->buffer_size = buffer_size; + ep->buffer = (u8 *)(ep+1); } + return ep; } diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c index 1c95d57..021d74a 100644 --- a/drivers/staging/ozwpan/ozpd.c +++ b/drivers/staging/ozwpan/ozpd.c @@ -103,34 +103,35 @@ void oz_pd_put(struct oz_pd *pd) struct oz_pd *oz_pd_alloc(const u8 *mac_addr) { struct oz_pd *pd; + int i; pd = kzalloc(sizeof(struct oz_pd), GFP_ATOMIC); - if (pd) { - int i; - - atomic_set(&pd->ref_count, 2); - for (i = 0; i < OZ_NB_APPS; i++) - spin_lock_init(&pd->app_lock[i]); - pd->last_rx_pkt_num = 0x; - oz_pd_set_state(pd, OZ_PD_S_IDLE); - pd->max_tx_size = OZ_MAX_TX_SIZE; - ether_addr_copy(pd->mac_addr, mac_addr); - oz_elt_buf_init(&pd->elt_buff); - spin_lock_init(&pd->tx_frame_lock); - INIT_LIST_HEAD(&pd->tx_queue); - INIT_LIST_HEAD(&pd->farewell_list); - pd->last_sent_frame = &pd->tx_queue; - spin_lock_init(&pd->stream_lock); - INIT_LIST_HEAD(&pd->stream_list); - tasklet_init(&pd->heartbeat_tasklet, oz_pd_heartbeat_handler, - (unsigned long)pd); - tasklet_init(&pd->timeout_tasklet, oz_pd_timeout_handler, - (unsigned long)pd); - hrtimer_init(&pd->heartbeat, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - hrtimer_init(&pd->timeout, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - pd->heartbeat.function = oz_pd_heartbeat_event; - pd->timeout.function = oz_pd_timeout_event; - } + if (!pd) + return NULL; + + atomic_set(&pd->ref_count, 2); + for (i = 0; i < OZ_NB_APPS; i++) + spin_lock_init(&pd->app_lock[i]); + pd->last_rx_pkt_num = 0x; + oz_pd_set_state(pd, OZ_PD_S_IDLE); + pd->max_tx_size = OZ_MAX_TX_SIZE; + ether_addr_copy(pd->mac_addr, mac_addr); + oz_elt_buf_init(&pd->elt_buff); + spin_lock_init(&pd->tx_frame_lock); + INIT_LIST_HEAD(&pd->tx_queue); + INIT_LIST_HEAD(&pd->farewell_list); + pd->last_sent_frame = &pd->tx_queue; + spin_lock_init(&pd->stream_lock); + INIT_LIST_HEAD(&pd->stream_list); + tasklet_init(&pd->heartbeat_tasklet, oz_pd_heartbeat_handler, + (unsigned long)pd); + tasklet_init(&pd->timeout_tasklet, oz_pd_timeout_handler, + (unsigned long)pd); + hrtimer_init(&pd->heartbeat, CLOCK_MONOTONIC, HRTIMER_MODE_REL); + hrtimer_init(&pd->timeout, CLOCK_MONOTONIC, HRTIMER_MODE_REL); + pd->heartbeat.function = oz_pd_heartbeat_event; + pd->timeout.function = oz_pd_timeout_event; + return pd; } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 1/1] staging: ozwpan: Remove allocation from delaration line
Looks good. Thanks! > diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c > index 8543bb2..96e95bf 100644 > --- a/drivers/staging/ozwpan/ozhcd.c > +++ b/drivers/staging/ozwpan/ozhcd.c > @@ -280,8 +280,9 @@ static void oz_free_urb_link(struct oz_urb_link *urbl) > */ > static struct oz_endpoint *oz_ep_alloc(int buffer_size, gfp_t mem_flags) > { > - struct oz_endpoint *ep = > - kzalloc(sizeof(struct oz_endpoint)+buffer_size, mem_flags); > + struct oz_endpoint *ep; > + > + ep = kzalloc(sizeof(struct oz_endpoint)+buffer_size, mem_flags); > if (ep) { Also notice how in the original code, we had to mangle the code to make it fit into 80 characters so the new code looks much better. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] staging: ozwpan: Remove allocation from delaration line
On Tue, Feb 10, 2015 at 09:55:03AM +0100, Quentin Lambert wrote: > static struct oz_endpoint *oz_ep_alloc(int buffer_size, gfp_t mem_flags) > { > - struct oz_endpoint *ep = > - kzalloc(sizeof(struct oz_endpoint)+buffer_size, mem_flags); > + struct oz_endpoint *ep; > + > + ep = kzalloc(sizeof(struct oz_endpoint)+buffer_size, mem_flags); > + > if (ep) { Don't put a blank line between the function and the test. They are part of the same thing. Also in a later patch, could you reverse the "if (ep) " to if (!ep) return NULL; The original code is "success handling" not "error handling". regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 7/7] staging: rtl8188eu: core : remove space before tabs
remove below checkpatch.pl warning WARNING: please, no space before tabs Signed-off-by: Pushpendra Singh --- drivers/staging/rtl8188eu/core/rtw_xmit.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c index 227498c..1559cb7 100644 --- a/drivers/staging/rtl8188eu/core/rtw_xmit.c +++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c @@ -94,7 +94,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) } pxmitpriv->pxmit_frame_buf = (u8 *)N_BYTE_ALIGMENT((size_t)(pxmitpriv->pallocated_frame_buf), 4); /* pxmitpriv->pxmit_frame_buf = pxmitpriv->pallocated_frame_buf + 4 - */ - /* ((size_t) (pxmitpriv->pallocated_frame_buf) &3); */ + /* ((size_t) (pxmitpriv->pallocated_frame_buf) &3); */ pxframe = (struct xmit_frame *)pxmitpriv->pxmit_frame_buf; @@ -132,7 +132,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) pxmitpriv->pxmitbuf = (u8 *)N_BYTE_ALIGMENT((size_t)(pxmitpriv->pallocated_xmitbuf), 4); /* pxmitpriv->pxmitbuf = pxmitpriv->pallocated_xmitbuf + 4 - */ - /* ((size_t) (pxmitpriv->pallocated_xmitbuf) &3); */ + /* ((size_t) (pxmitpriv->pallocated_xmitbuf) &3); */ pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf; @@ -281,8 +281,8 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame * /* (1) RTS_Threshold is compared to the MPDU, not MSDU. */ /* (2) If there are more than one frag in this MSDU, only the first frag uses protection frame. */ - /* Other fragments are protected by previous fragment. */ - /* So we only need to check the length of first fragment. */ + /* Other fragments are protected by previous fragment. */ + /* So we only need to check the length of first fragment. */ if (pmlmeext->cur_wireless_mode < WIRELESS_11_24N || padapter->registrypriv.wifi_spec) { if (sz > padapter->registrypriv.rts_thresh) { pattrib->vcs_mode = RTS_CTS; @@ -412,7 +412,7 @@ static void set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib) /* get user_prio from IP hdr */ if (pattrib->ether_type == 0x0800) { _rtw_pktfile_read(ppktfile, (u8 *)&ip_hdr, sizeof(ip_hdr)); -/* user_prio = (ntohs(ip_hdr.tos) >> 5) & 0x3; */ + /* user_prio = (ntohs(ip_hdr.tos) >> 5) & 0x3; */ user_prio = ip_hdr.tos >> 5; } else if (pattrib->ether_type == 0x888e) { /* "When priority processing of data frames is supported, */ @@ -1466,7 +1466,7 @@ s32 rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitfram if (rtw_xmit_classifier(padapter, pxmitframe) == _FAIL) { RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("rtw_xmitframe_enqueue: drop xmit pkt for classifier fail\n")); -/* pxmitframe->pkt = NULL; */ + /* pxmitframe->pkt = NULL; */ return _FAIL; } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/7] staging: rtl8188eu: core: remove indentation warning
remove checckpatch.pl warning WARNINGROR: switch and case should be at the same indent Signed-off-by: Pushpendra Singh --- drivers/staging/rtl8188eu/core/rtw_xmit.c | 32 +-- 1 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c index 1b4a418..92794f0 100644 --- a/drivers/staging/rtl8188eu/core/rtw_xmit.c +++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c @@ -1027,22 +1027,22 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct /* adding icv, if necessary... */ if (pattrib->iv_len) { switch (pattrib->encrypt) { - case _WEP40_: - case _WEP104_: - WEP_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx); - break; - case _TKIP_: - if (bmcst) - TKIP_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx); - else - TKIP_IV(pattrib->iv, psta->dot11txpn, 0); - break; - case _AES_: - if (bmcst) - AES_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx); - else - AES_IV(pattrib->iv, psta->dot11txpn, 0); - break; + case _WEP40_: + case _WEP104_: + WEP_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx); + break; + case _TKIP_: + if (bmcst) + TKIP_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx); + else + TKIP_IV(pattrib->iv, psta->dot11txpn, 0); + break; + case _AES_: + if (bmcst) + AES_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx); + else + AES_IV(pattrib->iv, psta->dot11txpn, 0); + break; } memcpy(pframe, pattrib->iv, pattrib->iv_len); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/7] staging: rtl8188eu: core: removed unnecessary braces
remove checkpatch.pl warning WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Pushpendra Singh --- drivers/staging/rtl8188eu/core/rtw_efuse.c| 3 +-- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 14 +- drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 4 ++-- drivers/staging/rtl8188eu/core/rtw_recv.c | 17 ++--- drivers/staging/rtl8188eu/core/rtw_xmit.c | 19 +++ 5 files changed, 21 insertions(+), 36 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index e15112b..e77fd99 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -644,9 +644,8 @@ static bool hal_EfusePgPacketWrite2ByteHeader(struct adapter *pAdapter, u8 efuse } if ((tmp_header & 0x0F) == 0x0F) { /* word_en PG fail */ - if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) { + if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) return false; - } efuse_addr++; continue; } else if (pg_header != tmp_header) { /* offset PG fail */ diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 868f5ec..f9ac1e7 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -299,9 +299,8 @@ static void init_channel_list(struct adapter *padapter, struct rt_channel_info * struct p2p_reg_class *reg = NULL; for (ch = o->min_chan; ch <= o->max_chan; ch += o->inc) { - if (!has_channel(channel_set, chanset_size, ch)) { + if (!has_channel(channel_set, chanset_size, ch)) continue; - } if ((0 == padapter->registrypriv.ht_enable) && (8 == o->inc)) continue; @@ -1420,11 +1419,10 @@ unsigned int OnAssocRsp(struct adapter *padapter, struct recv_frame *precv_frame UpdateBrateTbl(padapter, pmlmeinfo->network.SupportedRates); report_assoc_result: - if (res > 0) { + if (res > 0) rtw_buf_update(&pmlmepriv->assoc_rsp, &pmlmepriv->assoc_rsp_len, pframe, pkt_len); - } else { + else rtw_buf_free(&pmlmepriv->assoc_rsp, &pmlmepriv->assoc_rsp_len); - } report_join_res(padapter, res); @@ -1929,9 +1927,8 @@ s32 dump_mgntframe_and_wait_ack(struct adapter *padapter, struct xmit_frame *pmg pxmitpriv->ack_tx = true; pmgntframe->ack_report = 1; - if (rtw_hal_mgnt_xmit(padapter, pmgntframe) == _SUCCESS) { + if (rtw_hal_mgnt_xmit(padapter, pmgntframe) == _SUCCESS) ret = rtw_ack_tx_wait(pxmitpriv, timeout_ms); - } pxmitpriv->ack_tx = false; mutex_unlock(&pxmitpriv->ack_tx_mutex); @@ -4793,9 +4790,8 @@ void linked_status_chk(struct adapter *padapter) } } - if (tx_chk != _SUCCESS && pmlmeinfo->link_count++ == 0xf) { + if (tx_chk != _SUCCESS && pmlmeinfo->link_count++ == 0xf) tx_chk = issue_nulldata(padapter, NULL, 0, 1, 0); - } } if (rx_chk == _FAIL) { diff --git a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c index 1fe25ac..994460b 100644 --- a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c @@ -185,9 +185,9 @@ int ips_leave(struct adapter *padapter) DBG_88E("==>ips_leave cnts:%d\n", pwrpriv->ips_leave_cnts); result = rtw_ips_pwr_up(padapter); - if (result == _SUCCESS) { + if (result == _SUCCESS) pwrpriv->rf_pwrstate = rf_on; - } + DBG_88E_LEVEL(_drv_info_, "nolinked power save leave\n"); if ((_WEP40_ == psecuritypriv->dot11PrivacyAlgrthm) || (_WEP104_ == psecuritypriv->dot11PrivacyAlgrthm)) { diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 565feff..a36d27a 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -116,9 +116,8 @@ void _rtw_free_recv_priv(struct recv_priv *precvpriv) rtw_free_uc_swdec_pending_queue(padapter); - if (precvpriv->pallocated_frame_buf) { + if (precvpriv->pallocated_frame_buf) vfree(precvpriv->pallocated_frame_buf); - } rtw
[PATCH 1/7] staging: rtl8188eu: core: added blank line after declarations
Removed following checkpatch.pl warning from mutiple files WARNING: Missing a blank line after declarations Signed-off-by: Pushpendra Singh --- drivers/staging/rtl8188eu/core/rtw_debug.c | 3 ++- drivers/staging/rtl8188eu/core/rtw_efuse.c | 12 drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 4 drivers/staging/rtl8188eu/core/rtw_led.c | 1 + drivers/staging/rtl8188eu/core/rtw_mlme.c | 3 +++ drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 11 +++ drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 3 +++ drivers/staging/rtl8188eu/core/rtw_recv.c | 14 +++--- drivers/staging/rtl8188eu/core/rtw_security.c | 18 ++ drivers/staging/rtl8188eu/core/rtw_sreset.c| 1 + drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 1 + drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 4 drivers/staging/rtl8188eu/core/rtw_xmit.c | 3 +++ 13 files changed, 74 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_debug.c b/drivers/staging/rtl8188eu/core/rtw_debug.c index bc3fe10..4b9045d 100644 --- a/drivers/staging/rtl8188eu/core/rtw_debug.c +++ b/drivers/staging/rtl8188eu/core/rtw_debug.c @@ -217,8 +217,8 @@ int proc_get_ht_option(char *page, char **start, struct net_device *dev = data; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - int len = 0; + len += snprintf(page + len, count - len, "ht_option=%d\n", pmlmepriv->htpriv.ht_option); *eof = 1; return len; @@ -588,6 +588,7 @@ int proc_set_rx_signal(struct file *file, const char __user *buffer, if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) { int num = sscanf(tmp, "%u %u", &is_signal_dbg, &signal_strength); + is_signal_dbg = is_signal_dbg == 0 ? 0 : 1; if (is_signal_dbg && num != 2) return count; diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index 8816d11..e15112b 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -260,6 +260,7 @@ static void efuse_read_phymap_from_txpktbuf( u8 lenc[2]; u16 lenbak, aaabak; u16 aaa; + lenc[0] = usb_read8(adapter, REG_PKTBUF_DBG_DATA_L); lenc[1] = usb_read8(adapter, REG_PKTBUF_DBG_DATA_L+1); @@ -331,6 +332,7 @@ void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, v case TYPE_EFUSE_MAX_SECTION: { u8 *pMax_section; + pMax_section = pOut; *pMax_section = EFUSE_MAX_SECTION_88E; } @@ -338,6 +340,7 @@ void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, v case TYPE_EFUSE_REAL_CONTENT_LEN: { u16 *pu2Tmp; + pu2Tmp = pOut; *pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E; } @@ -345,6 +348,7 @@ void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, v case TYPE_EFUSE_CONTENT_LEN_BANK: { u16 *pu2Tmp; + pu2Tmp = pOut; *pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E; } @@ -352,6 +356,7 @@ void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, v case TYPE_AVAILABLE_EFUSE_BYTES_BANK: { u16 *pu2Tmp; + pu2Tmp = pOut; *pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E); } @@ -359,6 +364,7 @@ void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, v case TYPE_AVAILABLE_EFUSE_BYTES_TOTAL: { u16 *pu2Tmp; + pu2Tmp = pOut; *pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E); } @@ -366,6 +372,7 @@ void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, v case TYPE_EFUSE_MAP_LEN: { u16 *pu2Tmp; + pu2Tmp = pOut; *pu2Tmp = (u16)EFUSE_MAP_LEN_88E; } @@ -373,6 +380,7 @@ void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, v case TYPE_EFUSE_PROTECT_BYTES_BANK: { u8 *pu1Tmp; + pu1Tmp = pOut; *pu1Tmp = (u8)(EFUSE_OOB_PROTECT_BYTES_88E); } @@ -380,6 +388,7 @@ void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, v
[PATCH 4/7] staging: rtl8188eu: core: remove unnecessary parentheses
remove checkpatch.pl warning WARNING: Unnecessary parentheses - maybe == should be = ? Signed-off-by: Pushpendra Singh --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 4 ++-- drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +- drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 2 +- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 2 +- drivers/staging/rtl8188eu/core/rtw_xmit.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c index 2faf6b2..521ca4b 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c +++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c @@ -184,7 +184,7 @@ u8 rtw_set_802_11_bssid(struct adapter *padapter, u8 *bssid) rtw_free_assoc_resources(padapter, 1); - if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) { + if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) { _clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE); set_fwstate(pmlmepriv, WIFI_ADHOC_STATE); } @@ -258,7 +258,7 @@ u8 rtw_set_802_11_ssid(struct adapter *padapter, struct ndis_802_11_ssid *ssid) if ((pmlmepriv->assoc_ssid.SsidLength == ssid->SsidLength) && (!memcmp(&pmlmepriv->assoc_ssid.Ssid, ssid->Ssid, ssid->SsidLength))) { - if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false)) { + if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false) { RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("Set SSID is the same ssid, fw_state = 0x%08x\n", get_fwstate(pmlmepriv))); diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c index 55ed99c..4dfe2b6 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c @@ -660,7 +660,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf) rtw_set_signal_stat_timer(&adapter->recvpriv); if (pmlmepriv->to_join) { - if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true)) { + if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) { if (check_fwstate(pmlmepriv, _FW_LINKED) == false) { set_fwstate(pmlmepriv, _FW_UNDER_LINKING); diff --git a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c index b29e120..1fe25ac 100644 --- a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c @@ -307,7 +307,7 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv) pslv = PS_STATE_S3; } - if ((pwrpriv->rpwm == pslv)) { + if (pwrpriv->rpwm == pslv) { RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_, ("%s: Already set rpwm[0x%02X], new=0x%02X!\n", __func__, pwrpriv->rpwm, pslv)); return; diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c index 5646b6f..3bc7431 100644 --- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c @@ -1311,7 +1311,7 @@ int support_short_GI(struct adapter *padapter, struct HT_caps_element *pHT_caps) if (!(pmlmeinfo->HT_enable)) return _FAIL; - if ((pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_RALINK)) + if (pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_RALINK) return _FAIL; bit_offset = (pmlmeext->cur_bwmode & HT_CHANNEL_WIDTH_40) ? 6 : 5; diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c index d89c916..1b4a418 100644 --- a/drivers/staging/rtl8188eu/core/rtw_xmit.c +++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c @@ -805,7 +805,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr SetFrameSubType(fctrl, pattrib->subtype); if (pattrib->subtype & WIFI_DATA_TYPE) { - if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)) { + if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) { /* to_ds = 1, fr_ds = 0; */ /* Data transfer to AP */ SetToDs(fctrl); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/7] staging: rtl8188eu: core: removing unnecessary space
Removed unnecessary space before that ',' ERROR: space prohibited before that ',' (ctx:WxE) Signed-off-by: Pushpendra Singh --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 8 +++--- drivers/staging/rtl8188eu/core/rtw_mlme.c | 18 ++-- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 40 +- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 14 - drivers/staging/rtl8188eu/core/rtw_xmit.c | 4 +-- 5 files changed, 42 insertions(+), 42 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c index 6473d60..cc341d8 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c @@ -792,7 +792,7 @@ u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen) * * Returns: the address of the specific WPS attribute found, or NULL */ -u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8 *buf_attr, u32 *len_attr) +u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id, u8 *buf_attr, u32 *len_attr) { u8 *attr_ptr = NULL; u8 *target_attr_ptr = NULL; @@ -802,7 +802,7 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8 *buf_at *len_attr = 0; if ((wps_ie[0] != _VENDOR_SPECIFIC_IE_) || - (memcmp(wps_ie + 2, wps_oui , 4))) + (memcmp(wps_ie + 2, wps_oui, 4))) return attr_ptr; /* 6 = 1(Element ID) + 1(Length) + 4(WPS OUI) */ @@ -838,7 +838,7 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8 *buf_at * * Returns: the address of the specific WPS attribute content found, or NULL */ -u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8 *buf_content, uint *len_content) +u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id, u8 *buf_content, uint *len_content) { u8 *attr_ptr; u32 attr_len; @@ -1243,7 +1243,7 @@ void rtw_get_bcn_info(struct wlan_network *pnetwork) } else { pnetwork->BcnInfo.encryp_protocol = ENCRYP_PROTOCOL_OPENSYS; } - rtw_get_sec_ie(pnetwork->network.IEs , pnetwork->network.IELength, NULL, &rsn_len, NULL, &wpa_len); + rtw_get_sec_ie(pnetwork->network.IEs, pnetwork->network.IELength, NULL, &rsn_len, NULL, &wpa_len); RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_get_bcn_info: ssid =%s\n", pnetwork->network.Ssid.Ssid)); RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_get_bcn_info: wpa_len =%d rsn_len =%d\n", wpa_len, rsn_len)); RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_get_bcn_info: ssid =%s\n", pnetwork->network.Ssid.Ssid)); diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c index 4eb5019..55ed99c 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c @@ -141,7 +141,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *f } plist = free_queue->queue.next; - pnetwork = container_of(plist , struct wlan_network, list); + pnetwork = container_of(plist, struct wlan_network, list); list_del_init(&pnetwork->list); @@ -160,7 +160,7 @@ exit: return pnetwork; } -static void _rtw_free_network(struct mlme_priv *pmlmepriv , struct wlan_network *pnetwork, u8 isfreeall) +static void _rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork, u8 isfreeall) { u32 curr_time, delta_time; u32 lifetime = SCANQUEUE_LIFETIME; @@ -219,7 +219,7 @@ struct wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr) plist = phead->next; while (plist != phead) { - pnetwork = container_of(plist, struct wlan_network , list); + pnetwork = container_of(plist, struct wlan_network, list); if (!memcmp(addr, pnetwork->network.MacAddress, ETH_ALEN)) break; plist = plist->next; @@ -581,7 +581,7 @@ static int rtw_is_desired_network(struct adapter *adapter, struct wlan_network * } /* TODO: Perry: For Power Management */ -void rtw_atimdone_event_callback(struct adapter*adapter , u8 *pbuf) +void rtw_atimdone_event_callback(struct adapter*adapter, u8 *pbuf) { RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("receive atimdone_evet\n")); return; @@ -614,7 +614,7 @@ void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf) spin_lock_bh(&(pmlmepriv->scanned_queue.lock)); ibss_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->MacAddress); if (ibss_wlan) { - memcpy(ibss_wlan->network.IEs , pnetwork->IEs, 8); + me
[PATCH 3/7] staging: rtl8188eu: core: remove spaces at start of line
remove checkpatch.pl warning WARNING: please, no spaces at the start of a line Signed-off-by: Pushpendra Singh --- drivers/staging/rtl8188eu/core/rtw_led.c | 2 +- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/rtl8188eu/core/rtw_recv.c | 6 +- drivers/staging/rtl8188eu/core/rtw_security.c | 136 +- drivers/staging/rtl8188eu/core/rtw_xmit.c | 3 +- 5 files changed, 74 insertions(+), 75 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_led.c b/drivers/staging/rtl8188eu/core/rtw_led.c index 2b4c268..b129ea4 100644 --- a/drivers/staging/rtl8188eu/core/rtw_led.c +++ b/drivers/staging/rtl8188eu/core/rtw_led.c @@ -460,7 +460,7 @@ void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE LedAction) { struct led_priv *ledpriv = &(padapter->ledpriv); - if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped) || + if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped) || (!padapter->hw_init_completed)) return; diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index ad86108..868f5ec 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -4702,7 +4702,7 @@ void _linked_rx_signal_strehgth_display(struct adapter *padapter); void _linked_rx_signal_strehgth_display(struct adapter *padapter) { struct mlme_ext_priv*pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info*pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info*pmlmeinfo = &(pmlmeext->mlmext_info); u8 mac_id; int UndecoratedSmoothedPWDB; diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index a380338..565feff 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -34,11 +34,11 @@ static u8 SNAP_ETH_TYPE_APPLETALK_AARP[2] = {0x80, 0xf3}; /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */ static u8 rtw_bridge_tunnel_header[] = { - 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 + 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; static u8 rtw_rfc1042_header[] = { - 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 + 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS); @@ -202,7 +202,7 @@ int rtw_free_recvframe(struct recv_frame *precvframe, precvpriv->free_recvframe_cnt++; } - spin_unlock_bh(&pfree_recv_queue->lock); + spin_unlock_bh(&pfree_recv_queue->lock); return _SUCCESS; diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c b/drivers/staging/rtl8188eu/core/rtw_security.c index 790fa91..a36b889 100644 --- a/drivers/staging/rtl8188eu/core/rtw_security.c +++ b/drivers/staging/rtl8188eu/core/rtw_security.c @@ -391,74 +391,74 @@ void rtw_seccalctkipmic(u8 *key, u8 *header, u8 *data, u32 data_len, u8 *mic_cod /* 2-unsigned char by 2-unsigned char subset of the full AES S-box table */ static const unsigned short Sbox1[2][256] = { /* Sbox for hash (can be in ROM) */ { - 0xC6A5, 0xF884, 0xEE99, 0xF68D, 0xFF0D, 0xD6BD, 0xDEB1, 0x9154, - 0x6050, 0x0203, 0xCEA9, 0x567D, 0xE719, 0xB562, 0x4DE6, 0xEC9A, - 0x8F45, 0x1F9D, 0x8940, 0xFA87, 0xEF15, 0xB2EB, 0x8EC9, 0xFB0B, - 0x41EC, 0xB367, 0x5FFD, 0x45EA, 0x23BF, 0x53F7, 0xE496, 0x9B5B, - 0x75C2, 0xE11C, 0x3DAE, 0x4C6A, 0x6C5A, 0x7E41, 0xF502, 0x834F, - 0x685C, 0x51F4, 0xD134, 0xF908, 0xE293, 0xAB73, 0x6253, 0x2A3F, - 0x080C, 0x9552, 0x4665, 0x9D5E, 0x3028, 0x37A1, 0x0A0F, 0x2FB5, - 0x0E09, 0x2436, 0x1B9B, 0xDF3D, 0xCD26, 0x4E69, 0x7FCD, 0xEA9F, - 0x121B, 0x1D9E, 0x5874, 0x342E, 0x362D, 0xDCB2, 0xB4EE, 0x5BFB, - 0xA4F6, 0x764D, 0xB761, 0x7DCE, 0x527B, 0xDD3E, 0x5E71, 0x1397, - 0xA6F5, 0xB968, 0x, 0xC12C, 0x4060, 0xE31F, 0x79C8, 0xB6ED, - 0xD4BE, 0x8D46, 0x67D9, 0x724B, 0x94DE, 0x98D4, 0xB0E8, 0x854A, - 0xBB6B, 0xC52A, 0x4FE5, 0xED16, 0x86C5, 0x9AD7, 0x6655, 0x1194, - 0x8ACF, 0xE910, 0x0406, 0xFE81, 0xA0F0, 0x7844, 0x25BA, 0x4BE3, - 0xA2F3, 0x5DFE, 0x80C0, 0x058A, 0x3FAD, 0x21BC, 0x7048, 0xF104, - 0x63DF, 0x77C1, 0xAF75, 0x4263, 0x2030, 0xE51A, 0xFD0E, 0xBF6D, - 0x814C, 0x1814, 0x2635, 0xC32F, 0xBEE1, 0x35A2, 0x88CC, 0x2E39, - 0x9357, 0x55F2, 0xFC82, 0x7A47, 0xC8AC, 0xBAE7, 0x322B, 0xE695, - 0xC0A0, 0x1998, 0x9ED1, 0xA37F, 0x4466, 0x547E, 0x3BAB, 0x0B83, - 0x8CCA, 0xC729, 0x6BD3, 0x283C, 0xA779, 0xBCE2, 0x161D, 0xAD76, - 0xDB3B, 0x6456, 0x744E, 0x141E, 0x92DB, 0x0C0A, 0x486C, 0xB8E4, - 0x9F5D, 0xBD6E, 0x43EF, 0xC4A6, 0x39A8, 0x31A4, 0xD337, 0xF28B, - 0xD532, 0x8B43, 0x6E59, 0xDAB7, 0x018C, 0xB164, 0x9CD2, 0x49E0, - 0xD8B4, 0xACFA, 0xF307, 0xCF25, 0xCAAF, 0xF48E, 0x47E9, 0x1018, - 0x6FD5, 0xF088, 0x4A6F, 0x5C72, 0x3824, 0x57F1, 0x73C7, 0x9751, - 0xCB23, 0xA17C, 0xE89C, 0x3E21, 0x96DD, 0x61DC, 0x0D86, 0x0F85, - 0x
Re: Ralink 6570 / Mediatek MT7601STA (was Re: Addition of a wifi kernel module to the linux source tree)
Hello everone! A few months earlier I had requested addition of the MT7601 WiFi dongle module into the kernel. I was told that the needful would be done in the rt2x00 driver. Could you guys update me with the status? Thanks a lot! -Parth Sane On 4 December 2014 at 20:06, Stanislaw Gruszka wrote: > > On Thu, Dec 04, 2014 at 09:49:53AM +0100, Oleksij Rempel wrote: > > So far i know, Felix is working on abgn+ac (MT7662 and MT7612) devices. > > MT7601STA is (a)bgn. Are there similar regs? > > All Mediatek/Ralink devices I know have the same MAC registers, but > different BBP and RF registers. > > > In mt7601 code i see parts like "if (IS_RT3290(pAd) || IS_RT65XX(pAd) || > > IS_MT7601(pAd))". RT3290 is supported by rt2x00. > > Hence looks that support for this devices should be added to rt2x00. > > Stanislaw > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 1/1] staging: ozwpan: Remove allocation from delaration line
This patch removes allocation from declaration line because people are known to gloss over declarations. Signed-off-by: Quentin Lambert --- Changes since v1: - Remove the blank line between allocation and NULL check drivers/staging/ozwpan/ozhcd.c | 5 +++-- drivers/staging/ozwpan/ozpd.c | 8 +--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c index 8543bb2..96e95bf 100644 --- a/drivers/staging/ozwpan/ozhcd.c +++ b/drivers/staging/ozwpan/ozhcd.c @@ -280,8 +280,9 @@ static void oz_free_urb_link(struct oz_urb_link *urbl) */ static struct oz_endpoint *oz_ep_alloc(int buffer_size, gfp_t mem_flags) { - struct oz_endpoint *ep = - kzalloc(sizeof(struct oz_endpoint)+buffer_size, mem_flags); + struct oz_endpoint *ep; + + ep = kzalloc(sizeof(struct oz_endpoint)+buffer_size, mem_flags); if (ep) { INIT_LIST_HEAD(&ep->urb_list); INIT_LIST_HEAD(&ep->link); diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c index 852c288..1c95d57 100644 --- a/drivers/staging/ozwpan/ozpd.c +++ b/drivers/staging/ozwpan/ozpd.c @@ -102,8 +102,9 @@ void oz_pd_put(struct oz_pd *pd) */ struct oz_pd *oz_pd_alloc(const u8 *mac_addr) { - struct oz_pd *pd = kzalloc(sizeof(struct oz_pd), GFP_ATOMIC); + struct oz_pd *pd; + pd = kzalloc(sizeof(struct oz_pd), GFP_ATOMIC); if (pd) { int i; @@ -652,8 +653,9 @@ static struct oz_isoc_stream *pd_stream_find(struct oz_pd *pd, u8 ep_num) */ int oz_isoc_stream_create(struct oz_pd *pd, u8 ep_num) { - struct oz_isoc_stream *st = - kzalloc(sizeof(struct oz_isoc_stream), GFP_ATOMIC); + struct oz_isoc_stream *st; + + st = kzalloc(sizeof(struct oz_isoc_stream), GFP_ATOMIC); if (!st) return -ENOMEM; st->ep_num = ep_num; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] staging: ozwpan: Remove allocation from delaration line
This patch removes allocation from declaration line because people are known to gloss over declarations. Signed-off-by: Quentin Lambert --- This patch was inspired by http://www.spinics.net/lists/linux-usb/msg44389.html and https://lkml.org/lkml/2015/2/7/47 but I am not sure the argument is valid in the case of a single declaration. drivers/staging/ozwpan/ozhcd.c | 6 -- drivers/staging/ozwpan/ozpd.c | 10 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c index 8543bb2..230ba08 100644 --- a/drivers/staging/ozwpan/ozhcd.c +++ b/drivers/staging/ozwpan/ozhcd.c @@ -280,8 +280,10 @@ static void oz_free_urb_link(struct oz_urb_link *urbl) */ static struct oz_endpoint *oz_ep_alloc(int buffer_size, gfp_t mem_flags) { - struct oz_endpoint *ep = - kzalloc(sizeof(struct oz_endpoint)+buffer_size, mem_flags); + struct oz_endpoint *ep; + + ep = kzalloc(sizeof(struct oz_endpoint)+buffer_size, mem_flags); + if (ep) { INIT_LIST_HEAD(&ep->urb_list); INIT_LIST_HEAD(&ep->link); diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c index 852c288..3cc5f14 100644 --- a/drivers/staging/ozwpan/ozpd.c +++ b/drivers/staging/ozwpan/ozpd.c @@ -102,7 +102,9 @@ void oz_pd_put(struct oz_pd *pd) */ struct oz_pd *oz_pd_alloc(const u8 *mac_addr) { - struct oz_pd *pd = kzalloc(sizeof(struct oz_pd), GFP_ATOMIC); + struct oz_pd *pd; + + pd = kzalloc(sizeof(struct oz_pd), GFP_ATOMIC); if (pd) { int i; @@ -652,8 +654,10 @@ static struct oz_isoc_stream *pd_stream_find(struct oz_pd *pd, u8 ep_num) */ int oz_isoc_stream_create(struct oz_pd *pd, u8 ep_num) { - struct oz_isoc_stream *st = - kzalloc(sizeof(struct oz_isoc_stream), GFP_ATOMIC); + struct oz_isoc_stream *st; + + st = kzalloc(sizeof(struct oz_isoc_stream), GFP_ATOMIC); + if (!st) return -ENOMEM; st->ep_num = ep_num; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel