Re: svn commit: r324811 - in head/sys/dev/pms/freebsd/driver: common ini/src

2017-10-21 Thread Ryan Libby
On Sat, Oct 21, 2017 at 12:43 AM, Ngie Cooper (yaneurabeya)
 wrote:
>
>> On Oct 21, 2017, at 00:23, Ryan Libby  wrote:
>>
>> Author: rlibby
>> Date: Sat Oct 21 07:23:45 2017
>> New Revision: 324811
>> URL: https://svnweb.freebsd.org/changeset/base/324811
>>
>> Log:
>>  pms/freebsd: fix compiler warnings
>>
>>   - A number of unused variable warnings,
>>   - a missing prototype warning (actually a dead function),
>>   - and a potential use of an uninitialized variable.
>
> You probably should look for the other _fantastic_ fixes that Danny Ryan 
> cooked up for the driver. I don’t think you’ve found the branches that result 
> in logic errors which trigger corruption yet…
> Cheers,
> -Ngie

Thanks, I will ping him.  Yes, this is just from clang and gcc warnings
and of that just for what's under sys/dev/pms/freebsd.

I also have patches for fixes for warnings across sys/dev/pms, and pfg
has a spelling fixup patch.

There seems to be a little uncertainty about how to proceed wrt
maintenance of the driver, so I won't be pushing those changes until
that is clarified.  (Is freebsd the de facto upstream now?)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r324811 - in head/sys/dev/pms/freebsd/driver: common ini/src

2017-10-21 Thread Ngie Cooper (yaneurabeya)

> On Oct 21, 2017, at 00:23, Ryan Libby  wrote:
> 
> Author: rlibby
> Date: Sat Oct 21 07:23:45 2017
> New Revision: 324811
> URL: https://svnweb.freebsd.org/changeset/base/324811
> 
> Log:
>  pms/freebsd: fix compiler warnings
> 
>   - A number of unused variable warnings,
>   - a missing prototype warning (actually a dead function),
>   - and a potential use of an uninitialized variable.

You probably should look for the other _fantastic_ fixes that Danny Ryan cooked 
up for the driver. I don’t think you’ve found the branches that result in logic 
errors which trigger corruption yet…
Cheers,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r324811 - in head/sys/dev/pms/freebsd/driver: common ini/src

2017-10-21 Thread Ryan Libby
Author: rlibby
Date: Sat Oct 21 07:23:45 2017
New Revision: 324811
URL: https://svnweb.freebsd.org/changeset/base/324811

Log:
  pms/freebsd: fix compiler warnings
  
   - A number of unused variable warnings,
   - a missing prototype warning (actually a dead function),
   - and a potential use of an uninitialized variable.
  
  Reviewed by:  pfg
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D12683

Modified:
  head/sys/dev/pms/freebsd/driver/common/lxencrypt.c
  head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c
  head/sys/dev/pms/freebsd/driver/ini/src/osapi.c

Modified: head/sys/dev/pms/freebsd/driver/common/lxencrypt.c
==
--- head/sys/dev/pms/freebsd/driver/common/lxencrypt.c  Fri Oct 20 21:40:59 
2017(r324810)
+++ head/sys/dev/pms/freebsd/driver/common/lxencrypt.c  Sat Oct 21 07:23:45 
2017(r324811)
@@ -41,8 +41,8 @@
 #include 
 
 
-static atomic_t ioerr_queue_count;
 #ifdef ENCRYPT_ENHANCE
+static atomic_t ioerr_queue_count;
 /**
 careful_write():
 

Modified: head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c
==
--- head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c   Fri Oct 20 21:40:59 
2017(r324810)
+++ head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c   Sat Oct 21 07:23:45 
2017(r324811)
@@ -533,9 +533,6 @@ static int agtiapi_CharIoctl( struct cdev   *dev,
   tiIOCTLPayload_t *pIoctlPayload;
   struct agtiapi_softc *pCard;
   pCard=dev->si_drv1;
-  void *param1 = NULL;
-  void *param2 = NULL;
-  void *param3 = NULL;
   U32   status = 0;
   U32   retValue;
   int   err= 0;
@@ -649,8 +646,8 @@ static int agtiapi_CharIoctl( struct cdev   *dev,
   status = tiCOMMgntIOCTL( &pCard->tiRoot,
pIoctlPayload,
pCard,
-   param2,
-   param3 );
+   NULL,
+   NULL );
   if (status == IOCTL_CALL_PENDING)
   {
 ostiIOCTLWaitForSignal(&pCard->tiRoot,NULL, NULL, NULL);
@@ -2069,17 +2066,14 @@ int agtiapi_QueueCmnd_(struct agtiapi_softc *pmcsc, un
   /* get a ccb */
   if ((pccb = agtiapi_GetCCB(pmcsc)) == NULL)
   {
-ag_device_t *targ;
 AGTIAPI_PRINTK("agtiapi_QueueCmnd_: GetCCB ERROR\n");
 if (pmcsc != NULL)
 {
+  ag_device_t *targ;
   TID = INDEX(pmcsc, TID);
   targ   = &pmcsc->pDevList[TID];
-}
-if (targ != NULL)
-   {
   agtiapi_adjust_queue_depth(ccb->ccb_h.path,targ->qdepth);
-   }
+}
 ccb->ccb_h.status &= ~CAM_SIM_QUEUED;
 ccb->ccb_h.status &= ~CAM_STATUS_MASK;
 ccb->ccb_h.status |= CAM_REQUEUE_REQ;
@@ -3089,7 +3083,6 @@ STATIC void agtiapi_StartIO( struct agtiapi_softc *pmc
   ccb_t *pccb;
   int TID; 
   ag_device_t *targ;   
-  struct ccb_relsim crs;
 
   AGTIAPI_IO( "agtiapi_StartIO: start\n" );
 
@@ -4345,18 +4338,6 @@ int agtiapi_eh_HostReset( struct agtiapi_softc *pmcsc,
 }
 
 
-int agtiapi_eh_DeviceReset( struct agtiapi_softc *pmcsc, union ccb *cmnd )
-{
-  AGTIAPI_PRINTK( "agtiapi_eh_HostReset: ccb pointer %p\n",
-  cmnd );
-
-  if( cmnd == NULL )
-  {
-printf( "agtiapi_eh_HostReset: null command, skipping reset.\n" );
-return tiInvalidHandle;
-  }
-  return agtiapi_DoSoftReset( pmcsc );
-}
 /**
 agtiapi_QueueCCB()
 
@@ -5661,8 +5642,7 @@ Note:
 static void agtiapi_scan(struct agtiapi_softc *pmcsc)
 {
   union ccb *ccb;
-  int bus, tid, lun, card_no;
-  static int num=0;
+  int bus, tid, lun;
  
   AGTIAPI_PRINTK("agtiapi_scan: start cardNO %d \n", pmcsc->cardNo);
 

Modified: head/sys/dev/pms/freebsd/driver/ini/src/osapi.c
==
--- head/sys/dev/pms/freebsd/driver/ini/src/osapi.c Fri Oct 20 21:40:59 
2017(r324810)
+++ head/sys/dev/pms/freebsd/driver/ini/src/osapi.c Sat Oct 21 07:23:45 
2017(r324811)
@@ -764,7 +764,6 @@ ostiSetDeviceQueueDepth( tiRoot_t *tiRoot,
  )
 {
   bit32 retVal = 0;
-  struct agtiapi_softc *pCard = TIROOT_TO_CARD(tiRoot);
   ccb_t *pccb = (ccb_t *) tiIORequest->osData;
   tiDeviceHandle_t *tiDeviceHandle = pccb->devHandle;
   ag_device_t *pDevice = (ag_device_t *)tiDeviceHandle->osData;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"